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

body {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    color: #e5e5e5;
    overflow-x: hidden;
    background: #0a0a0a;
    cursor: auto;
}

/* ===== CUSTOM CURSOR ===== */
.custom-cursor {
    position: fixed;
    width: 12px;
    height: 12px;
    background: rgba(160, 160, 160, 0.6);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.2s ease;
    display: none; /* Disabilitato di default */
}

.custom-cursor.hover {
    transform: scale(1.2);
    background: rgba(200, 200, 200, 0.7);
}

/* ===== FLOATING PARTICLES ===== */
.floating-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(120, 120, 120, 0.2);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 20s linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* ===== AURORA BACKGROUND ===== */
.aurora-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(-45deg, #0a0a0a, #1a1a1a, #2a2a2a, #3a3a3a, #4a4a4a);
    background-size: 400% 400%;
    animation: aurora 20s ease-in-out infinite;
}

.aurora-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse 800px 600px at 20% 30%, rgba(80, 80, 80, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse 600px 400px at 80% 70%, rgba(100, 100, 100, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse 400px 800px at 50% 90%, rgba(120, 120, 120, 0.02) 0%, transparent 50%);
    animation: auroraGlow 25s ease-in-out infinite alternate;
}

.aurora-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse 60% 100% at center, transparent 30%, rgba(10, 10, 10, 0.7) 60%, #0a0a0a 90%);
    pointer-events: none;
}

@keyframes aurora {
    0% { background-position: 0% 50%; }
    25% { background-position: 100% 25%; }
    50% { background-position: 50% 100%; }
    75% { background-position: 25% 0%; }
    100% { background-position: 0% 50%; }
}

@keyframes auroraGlow {
    0% { 
        opacity: 0.15; 
        transform: scale(1) rotate(0deg); 
    }
    50% { 
        opacity: 0.25; 
        transform: scale(1.02) rotate(180deg); 
    }
    100% { 
        opacity: 0.2; 
        transform: scale(1.01) rotate(360deg); 
    }
}

/* ===== TEXT ANIMATIONS ===== */
.blur-text {
    filter: blur(12px);
    opacity: 0;
    transform: translateY(20px);
    animation: blurToFocus 2.5s ease-out forwards;
}

.blur-text.delay-1 { animation-delay: 0.3s; }
.blur-text.delay-2 { animation-delay: 0.6s; }
.blur-text.delay-3 { animation-delay: 0.9s; }

@keyframes blurToFocus {
    to {
        filter: blur(0);
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== GLASSMORPHISM CONTAINERS ===== */
.animated-content {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    animation: contentSlideUp 1.2s ease-out forwards;
    backdrop-filter: blur(12px);
    background: linear-gradient(135deg, 
        rgba(15, 15, 15, 0.95) 0%,
        rgba(25, 25, 25, 0.9) 50%,
        rgba(15, 15, 15, 0.95) 100%);
    border: 1px solid rgba(80, 80, 80, 0.3);
    border-radius: 20px;
    padding: 32px;
    margin: 24px auto;
    width: 90%;
    max-width: 650px;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.animated-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.02), transparent);
    transition: left 1s ease;
}

.animated-content:hover::before {
    left: 100%;
}

.animated-content:hover {
    transform: translateY(-1px) scale(1.002);
    border-color: rgba(100, 100, 100, 0.4);
    box-shadow: 
        0 10px 28px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(120, 120, 120, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.animated-content.delay-1 { animation-delay: 0.2s; }
.animated-content.delay-2 { animation-delay: 0.4s; }
.animated-content.delay-3 { animation-delay: 0.6s; }
.animated-content.delay-4 { animation-delay: 0.8s; }

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

/* ===== LANYARD PHOTO ===== */
.lanyard-container {
    position: relative;
    display: inline-block;
    margin-left: 20px;
}

.lanyard-cord {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 50px;
    background: linear-gradient(to bottom, #707070, #505050, #404040);
    border-radius: 2px;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.lanyard-cord::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #808080, #606060);
    border-radius: 50%;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.profile-pic {
    width: 160px;
    height: 160px;
    border-radius: 20px;
    object-fit: cover;
    border: 4px solid rgba(100, 100, 100, 0.3);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(120, 120, 120, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: lanyard-sway 6s ease-in-out infinite;
}

.profile-pic:hover {
    transform: scale(1.02);
    border-color: rgba(120, 120, 120, 0.4);
    box-shadow: 
        0 10px 28px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(140, 140, 140, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

@keyframes lanyard-sway {
    0%, 100% { transform: rotate(-1.5deg); }
    50% { transform: rotate(1.5deg); }
}

/* ===== HEADER SECTION ===== */
.header-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
}

.text-content h1 {
    font-size: 2.8rem;
    margin-bottom: 0.8rem;
    color: #f5f5f5;
    font-weight: bold;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.text-content h1 .highlight {
    background: linear-gradient(135deg, #d0d0d0 0%, #a0a0a0 50%, #808080 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.text-content h1 .highlight::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #a0a0a0, #808080);
    border-radius: 1px;
    opacity: 0.3;
}

.text-content h3 {
    font-size: 1.6rem;
    margin-bottom: 0.6rem;
    color: #b0b0b0;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.text-content p {
    font-size: 1.1rem;
    font-weight: 500;
    color: #909090;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ===== CENTER SECTIONS ===== */
.center-section {
    text-align: center;
}

.center-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #f0f0f0;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.university-title {
    background: linear-gradient(135deg, #c0c0c0 0%, #a0a0a0 50%, #808080 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.connect-title {
    background: linear-gradient(135deg, #b0b0b0 0%, #909090 50%, #707070 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== TAB SYSTEM ===== */
.university-section {
    position: relative;
    overflow: hidden;
}

.university-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(80, 80, 80, 0.02), transparent);
    animation: rotate 30s linear infinite;
    z-index: -1;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.university-content {
    position: relative;
    z-index: 2;
}

.tab-menu {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.tab-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.9), rgba(35, 35, 35, 0.8));
    border: 2px solid rgba(80, 80, 80, 0.4);
    border-radius: 25px;
    padding: 12px 24px;
    font-size: 1rem;
    color: rgba(200, 200, 200, 0.8);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tab-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.5s ease;
}

.tab-button:hover::before {
    left: 100%;
}

.tab-button.active {
    background: linear-gradient(135deg, rgba(40, 40, 40, 0.9), rgba(60, 60, 60, 0.8));
    border-color: rgba(100, 100, 100, 0.6);
    color: #f0f0f0;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.tab-button:hover {
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.9), rgba(50, 50, 50, 0.8));
    border-color: rgba(90, 90, 90, 0.5);
    color: #d0d0d0;
    transform: translateY(-1px);
}

.tab-content {
    min-height: 250px;
    transition: all 0.4s ease;
}

.tab-panel {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.tab-panel.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.degree-title {
    background: linear-gradient(135deg, #b0b0b0 0%, #909090 50%, #707070 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8rem;
    margin-top: 20px;
    font-weight: 700;
}

/* ===== WORK EXPERIENCE ===== */
.work-item {
    background: linear-gradient(135deg, rgba(18, 18, 18, 0.9), rgba(28, 28, 28, 0.8));
    border: 2px solid rgba(80, 80, 80, 0.4);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    text-align: left;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.work-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    transition: left 0.6s ease;
}

.work-item:hover::before {
    left: 100%;
}

.work-item:hover {
    border-color: rgba(100, 100, 100, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
}

.work-title {
    color: #c0c0c0;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.work-company {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Arial', 'Helvetica', sans-serif;
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.work-company.deloitte {
    position: relative;
    display: inline-block;
}

.work-company.deloitte::after {
    content: '●';
    color: #86bc25;
    font-size: 0.6rem;
    font-weight: normal;
    line-height: 1;
    margin-left: 2px;
}

.work-period {
    color: rgba(160, 160, 160, 0.7);
    font-size: 1rem;
    margin-bottom: 16px;
    font-style: italic;
}

.work-description {
    color: rgba(180, 180, 180, 0.9);
    font-size: 1rem;
    line-height: 1.6;
}

/* ===== UNIVERSITY LOGOS ===== */
.logoUniba, .logoFerraris {
    margin: 20px 0;
    filter: brightness(1.1) contrast(1.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logoUniba {
    width: 220px;
}

.logoFerraris {
    width: 150px;
}

.logoUniba:hover, .logoFerraris:hover {
    filter: brightness(1.2) contrast(1.1) drop-shadow(0 0 8px rgba(120, 120, 120, 0.3));
    transform: scale(1.02);
}

/* ===== SOCIAL SECTION ===== */
.social-section {
    position: relative;
}

.social-header {
    margin-bottom: 32px;
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    width: 100%;
    margin-top: 32px;
}

.social-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 36px 24px;
    background: linear-gradient(135deg, rgba(18, 18, 18, 0.9), rgba(28, 28, 28, 0.8));
    border: 2px solid rgba(80, 80, 80, 0.4);
    border-radius: 20px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #e0e0e0;
    min-height: 140px;
    position: relative;
    overflow: hidden;
}

.social-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.6s ease;
}

.social-item:hover::before {
    left: 100%;
}

.social-item:hover {
    background: linear-gradient(135deg, rgba(28, 28, 28, 0.9), rgba(38, 38, 38, 0.8));
    border-color: rgba(100, 100, 100, 0.6);
    transform: translateY(-1px) scale(1.005);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
}

.social-item .logo {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    filter: brightness(1.1);
    transition: all 0.3s ease;
}

.social-item:hover .logo {
    filter: brightness(1.2) drop-shadow(0 0 4px rgba(160, 160, 160, 0.3));
    transform: scale(1.02);
}

.social-label {
    font-size: 1rem;
    font-weight: 600;
    color: #a0a0a0;
    transition: color 0.3s ease;
}

.social-item:hover .social-label {
    color: #c0c0c0;
}

/* ===== PREMIUM BUTTON ===== */
.enhanced-button {
    background: linear-gradient(135deg, #606060 0%, #505050 50%, #404040 100%);
    border: none;
    border-radius: 16px;
    color: #f0f0f0;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 18px 36px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.enhanced-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.enhanced-button:hover::before {
    left: 100%;
}

.enhanced-button:hover {
    transform: translateY(-1px) scale(1.01);
    box-shadow: 
        0 10px 24px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(120, 120, 120, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.enhanced-button:active {
    transform: translateY(0) scale(1);
}

/* ===== CONTAINER ===== */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 24px;
    position: relative;
    z-index: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .custom-cursor {
        display: none;
    }

    .header-section {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: 24px;
        text-align: center;
        justify-items: center;
    }

    .lanyard-container {
        margin-left: 0;
        grid-row: 1;
    }

    .text-content {
        grid-row: 2;
    }

    .text-content h1 {
        font-size: 2.2rem;
    }

    .animated-content {
        width: 95%;
        padding: 24px;
    }

    .social-grid {
        gap: 20px;
    }
    
    .social-item {
        padding: 32px 20px;
        min-height: 120px;
    }
    
    .social-item .logo {
        width: 56px;
        height: 56px;
    }

    .tab-menu {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .tab-button {
        min-width: 180px;
        justify-content: center;
    }

    .profile-pic {
        width: 140px;
        height: 140px;
    }
}

@media (max-width: 480px) {
    .social-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        max-width: none;
    }

    .social-item {
        padding: 28px 20px;
        min-height: 100px;
    }

    .text-content h1 {
        font-size: 1.8rem;
    }
}