/* ============================================
   INSTITUTIONAL WEBSITE STYLESHEET
   Enrico Maria Bufacchi
   Sapienza-inspired Design
   ============================================ */

/* ============================================
   1. RESET & BASE STYLES
   ============================================ */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #333333;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   2. HEADER & NAVIGATION
   ============================================ */

.site-header {
    background: linear-gradient(135deg, #003366 0%, #004080 100%);
    color: white;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 8px 0;
    font-size: 0.85rem;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

.site-branding {
    padding: 20px 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid white;
    object-fit: cover;
}

.site-title-wrapper h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
    color: white;
}

.site-tagline {
    font-size: 0.95rem;
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

.main-navigation {
    background-color: rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: flex-start;
    gap: 0;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    display: block;
    padding: 15px 25px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
    border-bottom: none;
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .site-branding {
        flex-direction: column;
        text-align: center;
    }
    
    .nav-menu {
        flex-direction: column;
    }
    
    .nav-menu a {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* ============================================
   3. MAIN CONTENT LAYOUT
   ============================================ */

.main-content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 30px;
    min-height: 60vh;
}

.content-wrapper {
    background-color: white;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    padding: 40px;
    margin-bottom: 30px;
}

.section-header {
    border-bottom: 3px solid #003366;
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.section-header h1 {
    font-size: 2rem;
    color: #003366;
    font-weight: 600;
    margin: 0;
}

.section-header h2 {
    font-size: 1.5rem;
    color: #003366;
    font-weight: 600;
    margin: 0;
}

/* ============================================
   4. PROFILE SECTION (HOME PAGE)
   ============================================ */

.profile-section {
    background-color: white;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.profile-header {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e8e8e8;
}

.profile-image {
    width: 180px;
    height: 180px;
    border-radius: 4px;
    border: 3px solid #003366;
    flex-shrink: 0;
    object-fit: cover;
}

.profile-info h1 {
    font-size: 2.25rem;
    color: #003366;
    font-weight: 600;
    margin-bottom: 10px;
}

.profile-title {
    font-size: 1.1rem;
    color: #555555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.profile-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #003366;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    border: none;
}

.btn:hover {
    background-color: #004080;
}

.btn-secondary {
    background-color: #666666;
}

.btn-secondary:hover {
    background-color: #777777;
}

@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .profile-links {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
    }
}

/* ============================================
   5. CONTENT SECTIONS
   ============================================ */

.content-section {
    background-color: white;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.content-section h2 {
    font-size: 1.5rem;
    color: #003366;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8e8e8;
}

.content-section h3 {
    font-size: 1.2rem;
    color: #004080;
    font-weight: 600;
    margin-top: 25px;
    margin-bottom: 15px;
}

.content-section p {
    margin-bottom: 15px;
    line-height: 1.7;
    color: #444444;
}

/* ============================================
   6. TYPOGRAPHY
   ============================================ */

h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #003366;
    margin-bottom: 15px;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #003366;
    margin-top: 30px;
    margin-bottom: 15px;
}

h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #004080;
    margin-top: 20px;
    margin-bottom: 12px;
}

p {
    margin-bottom: 15px;
    line-height: 1.7;
}

em {
    font-style: italic;
}

strong {
    font-weight: 600;
    color: #222222;
}

/* ============================================
   7. LINKS
   ============================================ */

a {
    color: #003366;
    text-decoration: underline;
    transition: color 0.2s ease;
}

a:hover {
    color: #004080;
}

a:focus {
    outline: 2px solid #4a90e2;
    outline-offset: 2px;
}

/* ============================================
   8. WORK SECTIONS
   ============================================ */

.work-item {
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 20px;
    background-color: #fafafa;
    transition: box-shadow 0.3s ease;
}

.work-item:hover {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.work-item h3 {
    margin-top: 0;
    color: #003366;
}

.work-item p {
    margin-bottom: 8px;
}

.work-item a {
    color: #003366;
    font-weight: 500;
}

/* ============================================
   9. FOOTER
   ============================================ */

.site-footer {
    background-color: #2c2c2c;
    color: #cccccc;
    padding: 30px 0;
    margin-top: 60px;
    border-top: 4px solid #003366;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    text-align: center;
}

.footer-content p {
    margin: 5px 0;
    font-size: 0.9rem;
}

/* ============================================
   10. UTILITY CLASSES
   ============================================ */

.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-0 {
    margin-top: 0;
}

/* ============================================
   11. RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .main-content {
        padding: 0 15px;
        margin: 20px auto;
    }
    
    .content-wrapper,
    .profile-section,
    .content-section {
        padding: 25px 20px;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.35rem;
    }
    
    h3 {
        font-size: 1.1rem;
    }
}

/* ============================================
   12. PRINT STYLES
   ============================================ */

@media print {
    body {
        background: white;
        color: black;
        font-size: 12pt;
    }
    
    .site-header,
    .main-navigation,
    .site-footer,
    .profile-links {
        display: none;
    }
    
    .content-wrapper,
    .content-section,
    .profile-section {
        border: none;
        box-shadow: none;
        padding: 0;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
}
