:root {
    /* Palette più colorata e moderna */
    --bg-base: #1e1e2f;
    --bg-surface: #2a2a40;
    --bg-surface-hover: #353550;
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --accent-soft: #6366f1;
    --accent-highlight: #818cf8;
    --border-color: rgba(255, 255, 255, 0.12);
    --border-hover: rgba(255, 255, 255, 0.25);
    --glow-color: rgba(99, 102, 241, 0.3);
    
    --radius: 16px;
    --transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Sfondo animato con effetto Glassmorphism (Glasp) */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: linear-gradient(135deg, var(--bg-base) 0%, #0f0f17 100%);
    overflow: hidden;
}

.glow-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.85; /* Molto visibile */
}

.shape-1 {
    width: 25vw;
    height: 25vw;
    background: #3b82f6; /* Blue */
    top: 5%;
    left: 5%;
    animation: float1 15s infinite ease-in-out alternate;
}

.shape-2 {
    width: 28vw;
    height: 28vw;
    background: #8b5cf6; /* Purple */
    bottom: 5%;
    right: 5%;
    animation: float2 18s infinite ease-in-out alternate;
}

.shape-3 {
    width: 20vw;
    height: 20vw;
    background: #10b981; /* Emerald/Teal */
    top: 35%;
    left: 50%;
    opacity: 0.75;
    animation: float3 14s infinite ease-in-out alternate;
}

.shape-4 {
    width: 22vw;
    height: 22vw;
    background: #f43f5e; /* Soft Pink/Rose */
    bottom: 25%;
    left: 15%;
    opacity: 0.7;
    animation: float4 16s infinite ease-in-out alternate;
}

@keyframes float1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(45vw, 25vh) scale(1.3); }
}

@keyframes float2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-40vw, -45vh) scale(0.8); }
}

@keyframes float3 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-35vw, 35vh) scale(1.2); }
}

@keyframes float4 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40vw, -30vh) scale(0.9); }
}

/* Tipografia */
h1, h2, h3, h4 {
    font-weight: 500;
    color: #f8fafc;
    letter-spacing: -0.02em;
}

.hero {
    min-height: 35vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    position: relative;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #f8fafc, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero .subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 300;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

@media (min-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 900px) {
    .layout-split {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* Project Cards (Glassmorphism) */
.project-card {
    background-color: rgba(26, 29, 36, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: all var(--transition);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-soft), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 20px var(--glow-color);
    background-color: rgba(34, 38, 46, 0.75);
}

.project-card:hover::before {
    opacity: 1;
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    color: var(--text-main);
    transition: var(--transition);
}

.project-card:hover .icon-box {
    background-color: var(--accent-soft);
    border-color: var(--accent-highlight);
    color: #fff;
}

.badge {
    margin-left: auto;
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tagline {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-main);
}

.priority-tag {
    color: #bfa15f;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

p {
    color: var(--text-muted);
    font-size: 0.95rem; /* Testo leggermente più piccolo come richiesto */
}

.card-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.2rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform var(--transition);
}

.project-card:hover .card-image {
    transform: scale(1.02);
}

.highlight-text {
    font-style: italic;
    border-left: 2px solid var(--accent-soft);
    padding-left: 1rem;
    margin-top: 0.5rem;
}

/* Liste e riquadri interni */
.features-list {
    background: rgba(0,0,0,0.15);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.features-list h4 {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.features-list ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.features-list li {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.emoji {
    font-size: 1.1rem;
}

.info-box, .credentials-box, .highlight-box {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 1.2rem;
    margin-top: 1rem;
}

.info-box i {
    color: var(--accent-soft);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

code {
    background: rgba(0,0,0,0.3);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    color: var(--text-main);
}

.small-text {
    font-size: 0.85rem;
}

/* Footer & Bottoni */
.card-footer {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn i {
    font-size: 1rem;
}

.btn:not(.btn-outline) {
    background-color: var(--accent-soft);
    color: #fff;
    border: 1px solid var(--accent-highlight);
}

.btn:not(.btn-outline):hover {
    background-color: var(--accent-highlight);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--text-main);
    background-color: rgba(255,255,255,0.05);
}

footer {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

/* Animazioni */
.reveal-text {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s forwards ease-out;
}

.delay-1 {
    animation-delay: 0.2s;
}

.reveal-card {
    opacity: 0;
    transform: translateY(30px);
}

.reveal-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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