/* ========================================
   CSS Variables
   ======================================== */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --background-light: #f9fafb;
    --background-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* ========================================
   Reset & Base Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-white);
    font-size: 15px;
}

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

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

ul {
    list-style: none;
}

/* ========================================
   Container
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand a {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.1);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    margin: 3px 0;
    transition: var(--transition);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2c3e50;
    color: white;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.6s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: white;
    color: var(--primary-color);
}

/* ========================================
   Sections
   ======================================== */
.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    margin: 0 auto;
    border-radius: 2px;
}

/* ========================================
   Page Header
   ======================================== */
.page-header {
    background: #2c3e50;
    color: white;
    padding: 8rem 0 4rem;
    margin-top: 70px;
    text-align: center;
}

.page-header h1 {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ========================================
   About Section
   ======================================== */
.about {
    background-color: var(--background-white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: start;
}

.about-image {
    width: 250px;
    height: 250px;
    margin: 0 auto;
}

.about-image img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-xl);
    border: 4px solid var(--background-white);
}

.about-image-placeholder {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: var(--shadow-xl);
}

.about-image-placeholder i {
    font-size: 6.5rem;
    color: white;
}

.about-text h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--background-light);
    border-radius: 0.5rem;
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-item h4 {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.stat-item p {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* ========================================
   Interests & Skills
   ======================================== */
.interests-skills {
    background-color: var(--background-light);
}

.two-column-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.card {
    background-color: white;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.card h3 i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.interests-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-light);
}

.interests-list li:last-child {
    border-bottom: none;
}

.interests-list i {
    color: var(--primary-color);
    margin-right: 0.75rem;
}

.education-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.education-item:last-child {
    border-bottom: none;
}

.education-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(37, 99, 235, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.education-icon i {
    color: var(--primary-color);
    font-size: 1.3rem;
}

.education-content h4 {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.education-school {
    color: var(--text-light);
    font-size: 0.875rem;
}

.education-year {
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0.25rem 0;
}

.education-desc,
.education-grade {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* ========================================
   Quick Links
   ======================================== */
.quick-links {
    background-color: var(--background-white);
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.link-card {
    background-color: var(--background-light);
    padding: 2.5rem;
    border-radius: 1rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: var(--transition);
}

.link-card:hover::before {
    transform: scaleX(1);
}

.link-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.link-icon {
    width: 60px;
    height: 60px;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.link-icon i {
    font-size: 1.5rem;
    color: white;
}

.link-card h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.link-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.link-arrow {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: 700;
}

/* ========================================
   Publications
   ======================================== */
.publications {
    background-color: var(--background-light);
}

.publication-item {
    background-color: white;
    padding: 2rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border-left: 4px solid var(--primary-color);
}

.publication-item:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-lg);
}

.publication-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.publication-header h3 {
    font-size: 1.1rem;
    color: var(--text-dark);
    flex: 1;
}

.publication-year {
    background-color: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.publication-authors {
    color: var(--text-light);
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.publication-venue {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.publication-venue i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.publication-abstract {
    color: var(--text-light);
    line-height: 1.6;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.publication-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.pub-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition);
}

.pub-link:hover {
    background-color: var(--primary-color);
    color: white;
}

/* ========================================
   Academic Activities
   ======================================== */
.academic-activities {
    background-color: var(--background-white);
}

.activity-category {
    margin-bottom: 3rem;
}

.activity-category h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.activity-category h3 i {
    color: var(--primary-color);
    margin-right: 0.75rem;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.activity-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background-color: var(--background-light);
    border-radius: 0.75rem;
    transition: var(--transition);
}

.activity-item:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
}

.activity-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-icon i {
    color: white;
    font-size: 1.1rem;
}

.activity-content h4 {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.activity-location,
.activity-year,
.activity-desc {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.activity-year {
    color: var(--primary-color);
    font-weight: 600;
}

/* ========================================
   Research Interests
   ======================================== */
.research-interests {
    background-color: var(--background-light);
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.research-card {
    background-color: white;
    padding: 2rem;
    border-radius: 0.75rem;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.research-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.research-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.research-icon i {
    font-size: 1.7rem;
    color: white;
}

.research-card h3 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.research-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* ========================================
   Professional Experience
   ======================================== */
.professional-summary {
    background: #2c3e50;
    padding: 4rem 0;
}

.summary-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.summary-text h2 {
    font-size: 2rem;
    color: white;
    margin-bottom: 0.5rem;
}

.summary-text h3 {
    font-size: 1.3rem;
    color: white;
    margin-bottom: 1.5rem;
}

.summary-description {
    color: white;
    line-height: 1.8;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.summary-highlights {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.highlight-item:hover {
    box-shadow: var(--shadow-md);
}

.highlight-item i {
    font-size: 1.3rem;
    color: var(--primary-color);
}

.highlight-item span {
    color: var(--text-dark);
    font-weight: 600;
}

/* ========================================
   Experience Timeline
   ======================================== */
.professional-experience {
    background-color: var(--background-white);
}

.experience-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
}

.experience-timeline {
    position: relative;
    flex-shrink: 0;
}

.timeline-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 4px solid white;
    box-shadow: 0 0 0 4px var(--primary-color);
    position: relative;
    z-index: 1;
}

.timeline-line {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background-color: var(--border-color);
}

.experience-content {
    flex: 1;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.experience-header h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.experience-header h4 {
    font-size: 1rem;
    color: var(--primary-color);
}

.experience-period {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.experience-description p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.experience-tasks {
    list-style: none;
    padding: 0;
}

.experience-tasks li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-light);
    line-height: 1.6;
}

.experience-tasks li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6rem;
    width: 6px;
    height: 6px;
    background-color: var(--primary-color);
    border-radius: 50%;
}

.experience-technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tech-badge {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ========================================
   Technical Skills
   ======================================== */
.technical-skills {
    background-color: var(--background-light);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.skill-category {
    background-color: white;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.skill-category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.skill-category-header i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.skill-category-header h3 {
    font-size: 1.1rem;
    color: var(--text-dark);
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-name {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.875rem;
}

.skill-bar {
    width: 100%;
    height: 8px;
    background-color: var(--background-light);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 4px;
    transition: width 1s ease;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    background-color: var(--background-light);
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.skill-tag:hover {
    background-color: var(--primary-color);
    color: white;
}

/* ========================================
   Languages
   ======================================== */
.languages {
    background-color: var(--background-white);
}

.languages-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.language-item {
    background-color: var(--background-light);
    padding: 2rem;
    border-radius: 0.75rem;
    text-align: center;
    transition: var(--transition);
}

.language-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.language-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.language-item h3 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.language-item p {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* ========================================
   AI Services
   ======================================== */
.ai-services {
    padding: 80px 0;
    background-color: var(--background-light);
    position: relative;
    overflow: hidden;
}

.ai-services .section-header {
    position: relative;
    z-index: 1;
}

.ai-services .section-title {
    color: var(--text-dark);
}

.ai-services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.ai-service-card {
    background: #141B3A;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid rgba(41, 82, 255, 0.2);
    height: auto;
}

.ai-service-card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 0 40px rgba(0, 217, 255, 0.3),
        0 20px 60px rgba(0, 0, 0, 0.6);
    border-color: rgba(0, 217, 255, 0.6);
}

.ai-service-image {
    width: 100%;
    height: 180px;
    position: relative;
    background: linear-gradient(135deg, #2a3555 0%, #3d4a70 100%);
}

.ai-service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    position: relative;
    z-index: 1;
}

.ai-service-card:hover .ai-service-image img {
    transform: scale(1.1);
}

/* Supporto classi template */
.ai-service-card .card-image {
    width: 100%;
    height: 180px;
    position: relative;
}

.ai-service-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.ai-service-card:hover .card-image img {
    transform: scale(1.1);
}

.ai-service-card .card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(20, 27, 58, 0.6) 100%);
}

.ai-service-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(20, 27, 58, 0.6) 100%);
    z-index: 1;
}

/* Box 1 - Soluzioni GenAI (Pattern Rete Neurale come fallback) */
.ai-service-card:nth-child(1) .ai-service-image {
    background: linear-gradient(135deg, #2a3555 0%, #3d4a70 100%);
}

.ai-service-card:nth-child(1) .ai-service-image::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 35px, rgba(100, 140, 220, 0.1) 35px, rgba(100, 140, 220, 0.1) 36px),
        repeating-linear-gradient(90deg, transparent, transparent 35px, rgba(100, 140, 220, 0.1) 35px, rgba(100, 140, 220, 0.1) 36px),
        radial-gradient(circle at 15% 30%, rgba(100, 140, 220, 0.3) 0%, transparent 3%),
        radial-gradient(circle at 35% 50%, rgba(100, 140, 220, 0.3) 0%, transparent 3%),
        radial-gradient(circle at 55% 35%, rgba(100, 140, 220, 0.3) 0%, transparent 3%),
        radial-gradient(circle at 75% 55%, rgba(100, 140, 220, 0.3) 0%, transparent 3%),
        radial-gradient(circle at 85% 25%, rgba(100, 140, 220, 0.3) 0%, transparent 3%),
        radial-gradient(circle at 25% 70%, rgba(100, 140, 220, 0.3) 0%, transparent 3%),
        radial-gradient(circle at 65% 75%, rgba(100, 140, 220, 0.3) 0%, transparent 3%);
    background-size: 100% 100%;
    opacity: 0.6;
    z-index: 0;
}

/* Box 2 - AI Products (Pattern Grafici come fallback) */
.ai-service-card:nth-child(2) .ai-service-image {
    background: linear-gradient(135deg, #1e2a45 0%, #2d3a5a 100%);
}

.ai-service-card:nth-child(2) .ai-service-image::before {
    content: '';
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    height: 50%;
    background: 
        linear-gradient(to top, rgba(96, 165, 250, 0.5) 0%, rgba(96, 165, 250, 0.5) 70%, transparent 70%),
        linear-gradient(to top, rgba(34, 197, 94, 0.5) 0%, rgba(34, 197, 94, 0.5) 45%, transparent 45%),
        linear-gradient(to top, rgba(96, 165, 250, 0.5) 0%, rgba(96, 165, 250, 0.5) 85%, transparent 85%),
        linear-gradient(to top, rgba(34, 197, 94, 0.5) 0%, rgba(34, 197, 94, 0.5) 60%, transparent 60%),
        linear-gradient(to top, rgba(96, 165, 250, 0.5) 0%, rgba(96, 165, 250, 0.5) 40%, transparent 40%),
        linear-gradient(to top, rgba(34, 197, 94, 0.5) 0%, rgba(34, 197, 94, 0.5) 75%, transparent 75%),
        linear-gradient(to top, rgba(96, 165, 250, 0.5) 0%, rgba(96, 165, 250, 0.5) 55%, transparent 55%);
    background-size: 10% 100%, 10% 100%, 10% 100%, 10% 100%, 10% 100%, 10% 100%, 10% 100%;
    background-position: 5% bottom, 18% bottom, 31% bottom, 44% bottom, 57% bottom, 70% bottom, 83% bottom;
    background-repeat: no-repeat;
    z-index: 0;
}

.ai-service-content {
    padding: 1.5rem;
    color: white;
}

/* Supporto classi template */
.ai-service-card .card-content {
    padding: 1.5rem;
}

.ai-service-card .card-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 0.75rem;
}

.ai-service-card .card-description {
    font-size: 0.9rem;
    color: #8B96B8;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.ai-service-card .card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ai-service-card .tag {
    font-size: 0.75rem;
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-service-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 0.75rem;
}

.ai-service-content p {
    font-size: 0.85rem;
    color: #8B96B8;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.ai-service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ai-tag,
.tag {
    font-size: 0.75rem;
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.ai-tag.tag-orange,
.tag.tag-orange,
.tag-orange {
    background: rgba(255, 153, 0, 0.15);
    color: #FF9900;
    border: 1px solid rgba(255, 153, 0, 0.3);
}

.ai-tag.tag-blue,
.tag.tag-blue,
.tag-blue {
    background: rgba(41, 82, 255, 0.15);
    color: #2952FF;
    border: 1px solid rgba(41, 82, 255, 0.3);
    box-shadow: 0 0 10px rgba(41, 82, 255, 0.2);
}

.ai-tag.tag-green,
.tag.tag-green,
.tag-green {
    background: rgba(0, 255, 157, 0.15);
    color: #00FF9D;
    border: 1px solid rgba(0, 255, 157, 0.3);
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.2);
}

.ai-tag.tag-purple,
.tag.tag-purple,
.tag-purple {
    background: rgba(138, 43, 226, 0.15);
    color: #BB86FC;
    border: 1px solid rgba(138, 43, 226, 0.3);
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.2);
}

.ai-tag:hover,
.tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

/* ========================================
   Soft Skills
   ======================================== */
.soft-skills {
    background-color: var(--background-light);
}

.soft-skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.soft-skill-card {
    background-color: white;
    padding: 2rem;
    border-radius: 0.75rem;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.soft-skill-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.soft-skill-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.soft-skill-card h3 {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.soft-skill-card p {
    color: var(--text-light);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* ========================================
   Contact Section
   ======================================== */
.contact {
    background-color: var(--background-white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    align-items: start;
}

.contact-item i {
    font-size: 1.3rem;
    color: var(--primary-color);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.contact-item h4 {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.contact-item p,
.contact-item a {
    color: var(--text-light);
    font-size: 0.875rem;
}

.contact-item a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--background-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.social-links i {
    font-size: 1.1rem;
}

.contact-form-container {
    background-color: var(--background-light);
    padding: 2.5rem;
    border-radius: 0.75rem;
}

.contact-form-container h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.contact-note {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.contact-buttons {
    display: flex;
    gap: 1rem;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background-color: var(--text-dark);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer-content p {
    margin: 0.5rem 0;
    opacity: 0.8;
}

.footer-tech {
    font-size: 0.875rem;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .soft-skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        flex-direction: column;
        background-color: white;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transition: left 0.3s ease;
        align-items: flex-start;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.3rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .two-column-grid,
    .links-grid,
    .contact-grid,
    .research-grid,
    .languages-grid,
    .ai-services-grid {
        grid-template-columns: 1fr;
    }

    .summary-highlights {
        grid-template-columns: 1fr;
    }

    .soft-skills-grid {
        grid-template-columns: 1fr;
    }

    .experience-item {
        gap: 1rem;
    }

    .experience-header {
        flex-direction: column;
    }

    .experience-period {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.7rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 1.7rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }
}
