@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');

:root {
    --primary: #0f172a;       /* Dark Navy Header/Hero */
    --primary-light: #1e3a8a; /* Deep Blue Accent */
    --accent: #2563eb;        /* Royal Blue CTA & Buttons */
    --accent-hover: #1d4ed8;
    --bg-light: #f8fafc;      /* Background chiaro */
    --card-bg: #ffffff;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header & Nav */
header {
    background-color: var(--primary);
    color: #ffffff;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header .logo {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
    color: #ffffff;
    text-decoration: none;
}

nav a {
    color: #cbd5e1;
    text-decoration: none;
    margin-left: 1.8rem;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

nav a:hover, nav a.active {
    color: #ffffff;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 4px;
}

/* Layout Main Container */
main {
    flex: 1;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem;
}

.page-title {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
    text-align: center;
}

.page-subtitle {
    text-align: center;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 3rem auto;
    font-size: 1.1rem;
}

/* Stile Icone nei Titoli e nelle Card */
.card h3 i, .timeline-title i, .page-title i {
    margin-right: 0.6rem;
    color: var(--accent);
}

.hero h1 i {
    margin-right: 0.8rem;
    color: #93c5fd;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #ffffff;
    padding: 5rem 1.5rem;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1.2rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    color: #93c5fd;
    max-width: 800px;
    margin: 0 auto 2.5rem auto;
}

/* Cards Grid */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
    border-top: 4px solid var(--accent);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

.card h3 {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 0.8rem;
}

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

/* Tech Tags / Badges */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    background: #eff6ff;
    color: #1d4ed8;
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #bfdbfe;
}

/* Buttons */
.btn {
    background-color: var(--accent);
    color: #ffffff;
    padding: 0.8rem 1.8rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: background-color 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--accent-hover);
}

/* Timeline (Esperienza) */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    border-left: 3px solid var(--accent);
    padding-left: 2rem;
}

.timeline-item {
    margin-bottom: 2.5rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.6rem;
    top: 0.3rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--bg-light);
}

.timeline-date {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.3rem;
}

.timeline-title {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.timeline-body ul {
    list-style-type: disc;
    margin-left: 1.2rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

.timeline-body li {
    margin-bottom: 0.4rem;
}

/* Footer */
footer {
    background-color: var(--primary);
    color: #94a3b8;
    text-align: center;
    padding: 2rem 1.5rem;
    font-size: 0.9rem;
    border-top: 1px solid #334155;
}

footer a {
    color: #e2e8f0;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}


/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1.5rem;
}

.lang-btn {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #475569;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.2s ease;
}

.lang-btn:hover, .lang-btn.active {
    color: #ffffff;
    background-color: var(--accent);
    border-color: var(--accent);
}

.flag-icon {
    font-size: 1rem;
    line-height: 1;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
    }
    nav a {
        margin: 0 0.8rem;
    }
    .hero h1 {
        font-size: 1.8rem;
    }
}