        /* ===== CSS Variables for Theming ===== */
        :root {
            /* Light Mode Colors */
            --color-bg-primary: #f8f9fa;
            --color-bg-secondary: #ffffff;
            --color-bg-tertiary: #f0f2f5;
            --color-text-primary: #121212;
            --color-text-secondary: #4a4a4a;
            --color-accent-primary: #6200ee;
            --color-accent-secondary: #03dac6;
            --color-border: #e0e0e0;
            --color-shadow: rgba(0, 0, 0, 0.08);
            --color-node: rgba(98, 0, 238, 0.8);
            --color-node-hover: rgba(98, 0, 238, 1);
            --color-node-active: #03dac6;
            --color-line: rgba(98, 0, 238, 0.3);
            --color-gradient-start: #8e44ad;
            --color-gradient-end: #3498db;
            
            /* Common Variables */
            --header-height: 60px;
            --drawer-width: 30%;
            --border-radius: 8px;
            --transition-speed: 0.3s;
        }

        /* Dark Mode Colors */
        [data-theme="dark"] {
            --color-bg-primary: #121212;
            --color-bg-secondary: #1e1e1e;
            --color-bg-tertiary: #2d2d2d;
            --color-text-primary: #e0e0e0;
            --color-text-secondary: #a0a0a0;
            --color-accent-primary: #bb86fc;
            --color-accent-secondary: #03dac6;
            --color-border: #333333;
            --color-shadow: rgba(0, 0, 0, 0.2);
            --color-node: rgba(187, 134, 252, 0.8);
            --color-node-hover: rgba(187, 134, 252, 1);
            --color-node-active: #03dac6;
            --color-line: rgba(187, 134, 252, 0.3);
        }

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

        html, body {
            height: 100%;
            font-family: 'Inter', sans-serif;
            font-size: 16px;
            line-height: 1.6;
            color: var(--color-text-primary);
            background-color: var(--color-bg-primary);
            transition: background-color var(--transition-speed) ease, 
                        color var(--transition-speed) ease;
        }

        h1, h2, h3, h4, h5, h6 {
            font-family: 'Space Grotesk', sans-serif;
            font-weight: 600;
            margin-bottom: 1rem;
        }

        h1 {
            font-size: 2.5rem;
        }

        h2 {
            font-size: 1.8rem;
        }

        h3 {
            font-size: 1.5rem;
        }

        h4 {
            font-size: 1.25rem;
        }

        p {
            margin-bottom: 1rem;
        }

        a {
            color: var(--color-accent-primary);
            text-decoration: none;
            transition: color var(--transition-speed) ease;
        }

        a:hover {
            color: var(--color-accent-secondary);
        }

        ul, ol {
            margin-left: 1.5rem;
            margin-bottom: 1rem;
        }

        button {
            cursor: pointer;
            background: none;
            border: none;
            font-family: inherit;
            font-size: inherit;
            color: inherit;
            padding: 0.5rem 1rem;
            border-radius: var(--border-radius);
            transition: all var(--transition-speed) ease;
        }

        /* ===== Layout ===== */
        header {
            height: var(--header-height);
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 2rem;
            background-color: var(--color-bg-secondary);
            box-shadow: 0 2px 4px var(--color-shadow);
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 100;
        }

        .logo h1 {
            margin: 0;
            font-size: 1.8rem;
            background: linear-gradient(90deg, var(--color-accent-primary), var(--color-accent-secondary));
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        /* Aggiungi in header */
        .header-controls {
          display: flex;
          gap: 10px;
        }


        main.layout {
            display: flex;
            min-height: calc(100vh - var(--header-height));
            margin-top: var(--header-height);
        }

        /* ===== Left Column (Content) ===== */
        .left-column {
            flex: 1;
            min-width: 0;
        }

        /* ===== Content Area ===== */
        .content-area {
            height: 100%;
            padding: 2rem;
            overflow-y: auto;
            background-color: var(--color-bg-primary);
        }

        .content-container {
            max-width: 1000px;
            margin: 0 auto;
        }

        .content-section {
            margin-bottom: 3rem;
            padding: 1.5rem;
            background-color: var(--color-bg-secondary);
            border-radius: var(--border-radius);
            box-shadow: 0 4px 6px var(--color-shadow);
            display: none;
        }

        .content-section.active {
            display: block;
            animation: fadeIn 0.5s ease;
        }

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

        /* ===== Drawer (Right Column) ===== */
        .drawer {
            width: var(--drawer-width);
            background-color: var(--color-bg-secondary);
            border-left: 1px solid var(--color-border);
            box-shadow: -2px 0 5px var(--color-shadow);
            display: flex;
            flex-direction: column;
        }

        /* Tab Styles */
        .tab-header {
            display: flex;
            background-color: var(--color-bg-tertiary);
            border-bottom: 1px solid var(--color-border);
        }

        .tab-button {
            flex: 1;
            padding: 1rem;
            text-align: center;
            background: none;
            border: none;
            font-weight: 500;
            color: var(--color-text-secondary);
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .tab-button.active {
            background-color: var(--color-bg-secondary);
            color: var(--color-text-primary);
            border-bottom: 3px solid var(--color-accent-primary);
        }

        .tab-button:hover:not(.active) {
            background-color: rgba(var(--color-accent-primary), 0.1);
        }

        .tab-content {
            flex: 1;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
        }

        .tab-pane {
            display: none;
            flex: 1;
            overflow-y: auto;
            padding: 1.5rem;
        }

        .tab-pane.active {
            display: block;
        }

        /* Graph Navigation Styles */
        .graph-container {
            height: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: var(--color-bg-tertiary);
            border-radius: var(--border-radius);
        }

        .graph-placeholder {
            text-align: center;
            padding: 1rem;
            color: var(--color-text-secondary);
        }

        .graph-placeholder p {
            font-weight: 500;
            margin-bottom: 1.5rem;
        }

        .node-placeholder {
            display: inline-block;
            margin: 0.5rem;
            padding: 0.8rem 1.2rem;
            background-color: rgba(var(--color-accent-primary), 0.1);
            border-radius: 30px;
            font-size: 0.9rem;
            color: var(--color-accent-primary);
            border: 1px solid rgba(var(--color-accent-primary), 0.3);
            transition: all var(--transition-speed) ease;
            cursor: pointer;
        }

        .node-placeholder:hover {
            background-color: rgba(var(--color-accent-primary), 0.2);
            transform: translateY(-2px);
        }

        .node-placeholder.primary {
            background-color: rgba(var(--color-accent-secondary), 0.1);
            color: var(--color-accent-secondary);
            font-weight: 600;
            border-color: rgba(var(--color-accent-secondary), 0.3);
        }

        /* Drawer Content Styles */
        .filters, .future-events {
            margin-bottom: 2rem;
        }

        .filter-group {
            margin-bottom: 1.5rem;
        }

        .filter-group h4 {
            margin-bottom: 0.5rem;
            color: var(--color-text-secondary);
        }

        .filter-options label {
            display: block;
            margin-bottom: 0.5rem;
            cursor: pointer;
        }

        .filter-options input[type="checkbox"] {
            margin-right: 0.5rem;
            accent-color: var(--color-accent-primary);
        }

        .event {
            padding: 1rem;
            margin-bottom: 1rem;
            background-color: var(--color-bg-tertiary);
            border-radius: var(--border-radius);
            border-left: 4px solid var(--color-accent-primary);
        }

        .event h4 {
            margin-bottom: 0.25rem;
        }

        .event-date {
            font-size: 0.85rem;
            color: var(--color-text-secondary);
            margin-bottom: 0.5rem;
        }

        /* ===== Section-specific styles ===== */
        .gradient-text {
            background: linear-gradient(90deg, var(--color-accent-primary), var(--color-accent-secondary));
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            font-weight: bold;
        }

        .gradient-icon {
            background: linear-gradient(90deg, var(--color-accent-primary), var(--color-accent-secondary));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            color: transparent;
            display: inline-block;
            margin-right: 8px;
        }

        .card {
            background-color: var(--color-bg-secondary);
            border-radius: var(--border-radius);
            padding: 1.5rem;
            margin-bottom: 1.5rem;
            border: 1px solid var(--color-border);
            box-shadow: 0 2px 10px var(--color-shadow);
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        .card:hover {
            transform: translateY(-4px);
            box-shadow: 0 8px 16px var(--color-shadow);
        }

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

        .philosophy-cards {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 1.5rem;
        }

        .chip {
            display: inline-block;
            background: linear-gradient(90deg, var(--color-accent-primary), var(--color-accent-secondary));
            color: #fff;
            font-size: 0.75rem;
            font-weight: 500;
            padding: 0.25rem 0.6rem;
            margin: 0.25rem 0.25rem 0 0;
            border-radius: 9999px;
            text-transform: capitalize;
            white-space: nowrap;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        .chip:hover {
            transform: scale(1.05);
            box-shadow: 0 2px 6px var(--color-shadow);
        }

        .project-image {
            width: 100%;
            height: auto;
            max-height: 200px;
            object-fit: cover;
            border-radius: var(--border-radius);
            margin-bottom: 1rem;
            box-shadow: 0 4px 12px var(--color-shadow);
        }

        .project-version {
            position: absolute;
            top: 10px;
            right: 10px;
            background-color: rgba(255, 255, 255, 0.9);
            color: #333;
            padding: 3px 8px;
            border-radius: 5px;
            font-size: 0.8em;
            font-weight: bold;
            z-index: 10;
        }

        .progress-bar-container {
            width: 100%;
            height: 8px;
            background-color: #e0e0e0;
            border-radius: 4px;
            margin: 15px 0 10px;
            overflow: hidden;
        }

        .progress-bar {
            height: 100%;
            background: linear-gradient(to right, var(--color-accent-primary), var(--color-accent-secondary));
            border-radius: 4px;
            transition: width 0.5s ease-in-out;
        }

        /* ===== Theme Toggle ===== */
        #theme-toggle-btn {
            background-color: var(--color-bg-tertiary);
            border-radius: 50%;
            width: 40px;
            height: 40px;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 0;
        }

        #theme-toggle-btn:hover {
            background-color: var(--color-border);
        }

        .toggle-icon {
            font-size: 1.2rem;
        }

        /* Show/hide icons based on theme */
        .toggle-icon.light {
            display: block;
        }

        .toggle-icon.dark {
            display: none;
        }

        [data-theme="dark"] .toggle-icon.light {
            display: none;
        }

        [data-theme="dark"] .toggle-icon.dark {
            display: block;
        }

        /* ===== Footer ===== */
        footer {
            text-align: center;
            padding: 1rem;
            background-color: var(--color-bg-secondary);
            border-top: 1px solid var(--color-border);
            color: var(--color-text-secondary);
            font-size: 0.9rem;
        }

        /* ===== Responsive Design ===== */
        @media (max-width: 992px) {
            .layout {
                flex-direction: column;
            }
            
            .drawer {
                width: 100%;
                height: auto;
                border-left: none;
                border-top: 1px solid var(--color-border);
            }
            
            .graph-navigation {
                height: 35vh;
            }
        }

        @media (max-width: 768px) {
            header {
                padding: 0 1rem;
            }

            .content-area {
                padding: 1rem;
            }
            
            .graph-navigation {
                padding: 1rem;
            }
            
            .node-placeholder {
                padding: 0.6rem 1rem;
                font-size: 0.8rem;
            }
        }

        @media (max-width: 480px) {
            html {
                font-size: 14px;
            }
            
            .logo h1 {
                font-size: 1.5rem;
            }
            
            .content-section {
                padding: 1rem;
            }
            
            .research-areas-grid,
            .philosophy-cards {
                grid-template-columns: 1fr;
            }
        }

.philosophy-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.chip {
  display: inline-block;
  background: linear-gradient(90deg, var(--color-accent-primary), var(--color-accent-secondary));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  margin: 0.25rem 0.25rem 0 0;
  border-radius: 9999px;
  text-transform: capitalize;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chip:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 6px var(--color-shadow);
}

.project-image {
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: cover;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px var(--color-shadow);
}

.project-version {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(255, 255, 255, 0.9);
  color: #333;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 0.8em;
  font-weight: bold;
  z-index: 10;
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background-color: #e0e0e0;
  border-radius: 4px;
  margin: 15px 0 10px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(to right, var(--color-accent-primary), var(--color-accent-secondary));
  border-radius: 4px;
  transition: width 0.5s ease-in-out;
}

/* ===== Theme Toggle ===== */
#theme-toggle-btn {
  background-color: var(--color-bg-tertiary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
}

#theme-toggle-btn:hover {
  background-color: var(--color-border);
}

.toggle-icon {
  font-size: 1.2rem;
}

/* Show/hide icons based on theme */
.toggle-icon.light {
  display: block;
}

.toggle-icon.dark {
  display: none;
}

[data-theme="dark"] .toggle-icon.light {
  display: none;
}

[data-theme="dark"] .toggle-icon.dark {
  display: block;
}

/* ===== Footer ===== */
footer {
  text-align: center;
  padding: 1rem;
  background-color: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

/* ===== Responsive Design ===== */
@media (max-width: 992px) {
  .layout {
    flex-direction: column;
  }
  
  .drawer {
    width: 100%;
    height: auto;
    border-left: none;
    border-top: 1px solid var(--color-border);
  }
  
  .graph-navigation {
    height: 35vh;
  }
}

@media (max-width: 768px) {
  header {
    padding: 0 1rem;
  }

  .content-area {
    padding: 1rem;
  }
  
  .graph-navigation {
    padding: 1rem;
  }
  
  .node-placeholder {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
  
  .logo h1 {
    font-size: 1.5rem;
  }
  
  .content-section {
    padding: 1rem;
  }
  
  .research-areas-grid,
  .philosophy-cards {
    grid-template-columns: 1fr;
  }
}

/* ===== Animations ===== */
@keyframes pulse-glow {
  0%, 100% {
    text-shadow: 0 0 6px var(--color-accent-primary), 0 0 12px var(--color-accent-secondary);
  }
  50% {
    text-shadow: 0 0 10px var(--color-accent-secondary), 0 0 20px var(--color-accent-primary);
  }
}

/* Drawer icon animation */
.drawer-icon {
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--color-accent-primary), var(--color-accent-secondary));
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 1px var(--color-accent-primary), 0 0 12px var(--color-accent-secondary);
  animation: pulse-glow 4s infinite;
  transition: transform 0.4s ease, text-shadow 0.4s ease;
}


/* Quando il drawer è aperto: l’icona diventa più sobria e ruota */
.drawer.open .drawer-icon {
  color: #ffffff;
  text-shadow: none;
  animation: none;
}

/* Effetto pulsazione luminosa */
@keyframes pulse-glow {
  0%, 100% {
    text-shadow: 0 0 6px #225952, 0 0 12px #8342cc;
  }
  50% {
    text-shadow: 0 0 10px #843ec2, 0 0 20px #294313;
  }
}

#drawer-toggle-btn {
  background-color: var(--color-bg-tertiary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  cursor: pointer;
  border: none;
  color: var(--color-text-primary);
  font-size: 1.2rem;
}

.drawer-toggle {
  left: -60px !important;
}

.logo {
  display: flex;
  align-items: center;
  gap: 5px; /* spazio tra logo e titolo */
}

.logo img {
  height: 40px;
  width: auto;
  /* filter: grayscale(100%) contrast(150%) brightness(1.2);*/
  mix-blend-mode: screen;
  padding: 5px;
  border-radius: 6px;
}

.logo h1 {
  font-size: 1.8rem;
  margin: 0;
  font-weight: bold;
  color: #fff; /* o un altro colore in tema */
}

.philosophy {
  margin-top: 3rem;
}


.philosophy-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.card {

  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 8px rgba(60, 60, 60, 0.479);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.gradient-text {
  background: linear-gradient(90deg, #ff6ec4, #7873f5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text; /* fallback */
  font-weight: bold;
}

.gradient-icon {
  background: linear-gradient(90deg, #ff6ec4, #7873f5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent; /* fallback */
  display: inline-block;
  margin-right: 8px;
}

.chip {
  display: inline-block;
  background: linear-gradient(90deg, #6366f1, #a78bfa); /* violet-blue gradient */
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  margin: 0.25rem 0.25rem 0 0;
  border-radius: 9999px;
  text-transform: capitalize;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chip:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.project-image {
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: cover;
  border-radius: 0.75rem; /* rounded corners */
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

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

/* Stile per la card del progetto */
.book.card {
    position: relative; /* Necessario per posizionare gli elementi interni */
    overflow: hidden; /* Assicura che la barra di progresso non esca dai bordi */
}

/* Stile per la versione del progetto */
.project-version {
    position: absolute;
    top: 10px; /* Distanza dall'alto */
    right: 10px; /* Distanza da destra */
    background-color: #f0f0f0; /* Sfondo chiaro per la versione */
    color: #333; /* Colore del testo */
    padding: 3px 8px; /* Spaziatura interna */
    border-radius: 5px; /* Bordi arrotondati */
    font-size: 0.8em; /* Dimensione del font leggermente più piccola */
    font-weight: bold;
    z-index: 10; /* Assicura che sia sopra altri elementi */
}

/* Contenitore della barra di avanzamento */
.progress-bar-container {
    width: calc(100% - 20px); /* Larghezza del contenitore (sottraendo il padding orizzontale della card) */
    height: 8px; /* Altezza della barra */
    background-color: #e0e0e0; /* Colore di sfondo della barra vuota */
    border-radius: 4px; /* Bordi arrotondati */
    margin: 15px 10px 10px 10px; /* Margine superiore, destro, inferiore, sinistro */
    overflow: hidden; /* Nasconde la parte della barra che esce */
}

/* La barra di avanzamento vera e propria */
.progress-bar {
    height: 100%; /* Occupa tutta l'altezza del contenitore */
    background: linear-gradient(to right, #4CAF50, #8BC34A); /* Gradiente di colore verde */
    border-radius: 4px; /* Bordi arrotondati */
    transition: width 0.5s ease-in-out; /* Animazione fluida per il cambiamento della larghezza */
}

.description {
  font-size: 13px;
}

/* Stile per mobile */
@media (max-width: 992px) {
  .drawer {
    position: fixed;
    top: var(--header-height);
    right: 0;
    bottom: 0;
    width: 80%;
    max-width: 400px;
    transform: translateX(100%);
    transition: transform var(--transition-speed) ease;
    z-index: 99;
  }

  .drawer.open {
    transform: translateX(0);
  }
}