:root {
    --primary-color: #333;
    --secondary-color: #666;
    --accent-color: #0077cc;
    --background-color: #ffffff;
    --light-gray: #f5f5f5;
    --font-main: 'Noto Sans', sans-serif;
    --font-serif: 'Noto Serif', serif;
    --header-height: 70px;
    --blue-filter: #008eba;
}

body {
    font-family: var(--font-main);
    color: var(--primary-color);
    line-height: 1.6;
    background-color: var(--background-color);
    font-weight: 300;
    padding-top: calc(var(--header-height) + 20px);
}

/* Typography */
.testo-grande {
    font-size: 24px;
}

/* Header Styles */
header {
    height: var(--header-height);
    background-color: var(--background-color);
    border-bottom: 1px solid #eee;
    transition: box-shadow 0.3s;
}

header.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.site-title {
    font-family: var(--font-main);
    font-size: 24px;
    font-weight: 500;
}

/* Navigation */
.navbar-nav .nav-link {
    color: var(--primary-color);
    font-weight: 400;
    transition: color 0.3s;
    padding: 0.5rem 1rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--accent-color);
}

.navbar-toggler{ 
    border: transparent;
}

.navbar-toggler:focus{ 
    border: transparent;
    box-shadow: none;
}

/* Hamburger menu custom icons */
.navbar-toggler .navbar-toggler-icon {
  background-image: none;
  position: relative;
  width: 1.5rem;
  height: 1.5rem;
}

.navbar-toggler.collapsed .navbar-toggler-icon::before {
  content: "\2630";
  font-size: 1.5rem;
  line-height: 1.5rem;
  display: block;
  text-align: center;
  color: #333;
}

.navbar-toggler:not(.collapsed) .navbar-toggler-icon::before {
  content: "\00D7";
  font-size: 1.5rem;
  line-height: 1.5rem;
  display: block;
  text-align: center;
  color: #333;
}

.container{
    padding: 0% 10%;
}

/* Intro Section */
.intro {
    margin-bottom: 60px;
    padding-top: 20px;
}

.profile-image {
    border-radius: 20%;
    object-fit: cover;
}

/* Section Styling */
.section-title {
    font-size: 40px;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Links */
.about-link {
    display: inline-block;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.about-link:hover {
    text-decoration: underline;
}

/* Research, Publications, Teaching */
.research-title, 
.publication-title, 
.teaching-title, 
.cv-item-title {
    font-size: 18px;
    font-weight: 500;
    padding: 0px;
}

.research-description, 
.publication-description, 
.teaching-description {
    color: var(--secondary-color);
    padding: 0px;
}

.teaching-location {
    color: var(--secondary-color);
    padding: 0px;
}

.research-project-image {
    width: 100%;
    object-fit: cover;
    margin: 15px 0;
}

.research-project-link, 
.publication-link, 
.teaching-link {
    color: var(--accent-color);
    text-decoration: none;
    padding: 0px;
}

.research-project-link:hover, 
.publication-link:hover, 
.teaching-link:hover {
    text-decoration: underline;
    padding: 0px;
}

.publication-venue {
    font-size: 16px;
    font-weight: 400;
    padding: 0px;
}

.publication-venue-italic {
    font-size: 16px;
    font-weight: 100;
    padding: 0px;
}

/* Design Grid */
.design-category {
    margin-top: 50px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.design-category-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    font-family: var(--font-main);
    font-style: italic;
}

.design-project {
    margin-bottom: 40px;
}

.design-project-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    margin-bottom: 15px;
}

.ai-project-image {
    width: 100%;
    object-fit: cover;
    margin-bottom: 15px;
}

.design-project-title {
    font-size: 18px;
    margin-bottom: 8px;
    font-weight: 600;
}

.design-project-description {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.design-project-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

/* CV Sections */
.cv-section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    font-family: var(--font-main);
    font-style: italic;
}

.cv-item {
    margin-bottom: 20px;
}

.cv-section {
    margin-top: 50px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.cv-item-period {
    color: var(--secondary-color);
    margin-bottom: 5px;
    font-style: italic;
}

/* Footer */
footer {
    background-color: var(--background-color);
    color: var(--secondary-color);
    font-size: 14px;
}

.social-links {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.social-links a {
    margin: 0 10px;
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--accent-color);
}

/* Reset paragraph margins */
p {
    display: block;
    margin-block-start: 0em;
    margin-block-end: 0em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    unicode-bidi: isolate;
}

/* SLIDER BASE STYLES - Usato da tutte le pagine */
.research-slider {
    position: relative;
    height: 200px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.slide.active {
    display: block;
    opacity: 1;
}

.slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* Filtro blu per le slide */
.slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--blue-filter);
    mix-blend-mode: color;
    pointer-events: none;
    z-index: 1;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent;
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 4px;
    z-index: 10;
    transition: all 0.3s ease;
}

.slider-btn:hover {
    color: var(--blue-filter);
    transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev {
    left: 15px;
}

.slider-btn.next {
    right: 15px;
}

.slider-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active,
.indicator:hover {
    background-color: var(--blue-filter);
    transform: scale(1.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .site-title {
        font-size: 20px;
    }
    
    .about-page-title {
        font-size: 36px;
    }
    
    .about-page-subtitle {
        font-size: 18px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .testo-grande {
        font-size: 20px;
    }
    
    .design-project-image {
        height: 250px;
    }
    
    .research-slider {
        height: 250px;
    }
    
    .slider-btn {
        padding: 10px 15px;
        font-size: 16px;
    }
}


/* SLIDER BASE STYLES - Usato da tutte le pagine */
.research-slider {
    position: relative;
    height: 200px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    /* border-radius: 8px; RIMOSSO */
}

.slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* border-radius: 8px; RIMOSSO */
}

/* Filtro blu per le slide - MODIFICATO per controllo dinamico */
.slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--blue-filter);
    mix-blend-mode: color;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.3s ease; /* Aggiunto per transizioni smooth */
    opacity: 0.8; /* Filtro attivo di default */
}

/* Classe per rimuovere il filtro quando attivo */
.slide.no-filter::after {
    opacity: 0;
}