

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0F172A;
    --bg-card: #1E293B;
    --text-primary: #E5E7EB;
    --text-secondary: #94A3B8;
    --accent: #38BDF8;
    --accent-hover: #0EA5E9;
    --accent-secondary: #A855F7;
    --border: #334155;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== LAYOUT ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container-narrow {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

.center {
    text-align: center;
}

/* ===== NAVIGATION ===== */
.navbar {
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--accent);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--bg-dark);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-secondary:hover {
    background-color: var(--accent);
    color: var(--bg-dark);
}

.btn-large {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
}

.button-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* ===== HERO SECTION ===== */
.hero {
    padding: 6rem 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.highlight {
    color: var(--accent);
    font-weight: 600;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.visual-placeholder {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.visual-placeholder svg {
    width: 100%;
    height: auto;
    opacity: 0.8;
}

/* ===== SECTIONS ===== */
section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.section-title.center {
    text-align: center;
}

.section-intro {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.subsection-title {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

/* ===== ABOUT SECTION ===== */
.about {
    background-color: var(--bg-card);
}

.about-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 4rem;
    align-items: start;
}

.image-placeholder {
    width: 300px;
    height: 300px;
    border-radius: 16px;
    overflow: hidden;
    border: 3px solid var(--accent);
}

.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.skills-list {
    list-style: none;
    margin-top: 1rem;
}

.skills-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
}

.skills-list li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 1.25rem;
}

/* ===== THESIS HIGHLIGHT ===== */
.thesis-highlight {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
}

.thesis-card {
    background-color: var(--bg-card);
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    max-width: 800px;
    margin: 0 auto;
}

.thesis-tag {
    display: inline-block;
    background-color: rgba(56, 189, 248, 0.2);
    color: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.thesis-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.thesis-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* ===== CONTACT SECTION ===== */
.contact {
    background-color: var(--bg-card);
}

.contact p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background-color: var(--bg-dark);
    border: 2px solid var(--border);
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.contact-link:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.contact-link svg {
    width: 24px;
    height: 24px;
}

/* ===== FOOTER ===== */
.footer {
    background-color: var(--bg-dark);
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-secondary);
}

/* ===== THESIS PAGE ===== */
.thesis-header {
    padding: 4rem 0 2rem;
    text-align: center;
}

.thesis-meta {
    display: inline-block;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.page-title {
    font-size: 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.thesis-section {
    padding: 4rem 0;
}

.bg-dark {
    background-color: var(--bg-card);
}

.content-card {
    background-color: var(--bg-card);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-top: 2rem;
}

.content-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.mt-large {
    margin-top: 3rem;
}

/* ===== STRUCTURE GRID ===== */
.structure-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
    margin-top: 3rem;
}

.structure-item {
    background-color: var(--bg-dark);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid var(--border);
    text-align: center;
}

.structure-number {
    display: inline-block;
    background-color: var(--accent);
    color: var(--bg-dark);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
    margin: 0 auto 1rem;
}

.structure-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.structure-item p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.structure-arrow {
    font-size: 2rem;
    color: var(--accent);
}

/* ===== TETRAD GRID ===== */
.tetrad-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}

.tetrad-item {
    background-color: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid var(--border);
}

.tetrad-item h3 {
    color: var(--accent);
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.tetrad-item p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* ===== TWO COLUMN ===== */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 2rem 0;
}

.two-column h4 {
    color: var(--accent);
    margin-bottom: 1rem;
}

.two-column ul {
    list-style: none;
}

.two-column li {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== QUOTES ===== */
.quote {
    border-left: 4px solid var(--accent);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 1.0625rem;
}

.quote-large {
    font-size: 1.75rem;
    text-align: center;
    color: var(--accent);
    font-style: italic;
    margin: 2rem 0;
    line-height: 1.5;
}

/* ===== STYLED LIST ===== */
.styled-list {
    list-style: none;
    margin-top: 1.5rem;
}

.styled-list li {
    padding: 1rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.styled-list li:last-child {
    border-bottom: none;
}

.styled-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 1.25rem;
    font-weight: 700;
}

/* ===== MIRROR VISUAL ===== */
.mirror-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin: 3rem 0;
}

.mirror-item {
    text-align: center;
}

.mirror-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.mirror-item p {
    color: var(--text-secondary);
    font-weight: 600;
}

.mirror-arrow {
    font-size: 3rem;
    color: var(--accent);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .image-placeholder {
        margin: 0 auto;
    }
    
    .structure-grid {
        grid-template-columns: 1fr;
    }
    
    .structure-arrow {
        transform: rotate(90deg);
    }
    
    .tetrad-grid {
        grid-template-columns: 1fr;
    }
    
    .two-column {
        grid-template-columns: 1fr;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    .container,
    .container-narrow {
        padding: 0 1rem;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .hero-buttons,
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .mirror-visual {
        flex-direction: column;
        gap: 1rem;
    }
    
    .mirror-arrow {
        transform: rotate(90deg);
    }
}

/* ===== NEURAL BACKGROUND GLOBALE ===== */
#neural-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1; /* sempre sotto i contenuti */
    pointer-events: none; /* permette di cliccare tutto sopra */
    background-color: var(--bg-dark); /* colore di base sotto le particelle */
}

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .image-placeholder {
        margin: 0 auto;
    }
    
    .structure-grid {
        grid-template-columns: 1fr;
    }
    
    .structure-arrow {
        transform: rotate(90deg);
    }
    
    .tetrad-grid {
        grid-template-columns: 1fr;
    }
    
    .two-column {
        grid-template-columns: 1fr;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    .container,
    .container-narrow {
        padding: 0 1rem;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .hero-buttons,
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .mirror-visual {
        flex-direction: column;
        gap: 1rem;
    }
    
    .mirror-arrow {
        transform: rotate(90deg);
    }

    /* --- FIX PER MOBILE (Frecce Tesi) --- */
@media (max-width: 768px) {
    .structure-grid {
        display: flex;       /* Cambia da Grid a Flex */
        flex-direction: column; /* Mette gli elementi in colonna uno sotto l'altro */
        align-items: center;    /* Centra tutto */
        gap: 0;                 /* Resetta il gap per gestirlo con i margini */
    }

    .structure-arrow {
        /* Ruota la freccia di 90 gradi per farla puntare verso il basso (↓) */
        transform: rotate(90deg); 
        
        /* Aggiunge spazio vitale sopra e sotto la freccia */
        margin: 20px 0;       
        
        /* Assicura che non si sovrapponga */
        position: static; 
        display: block;
    }
    
    .structure-item {
        /* Assicura che le card abbiano larghezza piena su mobile */
        width: 100%;
        margin-bottom: 0;
    }
}

}

