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

html {
    font-size: 16px;
    line-height: 1.6;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #2c3e50;
    background: #ffffff;
    font-weight: 400;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #1a252f;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: #4a5568;
}

/* Links */
a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #5a67d8;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    color: white;
}

.btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
}

/* Text utilities */
.text-center {
    text-align: center;
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: white;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
}

/* Main Content */
.main {
    min-height: calc(100vh - 80px);
}

/* About Section */
.about {
    padding: 4rem 0;
    background: linear-gradient(135deg, #fdf2e9 0%, #fbeee6 100%);
}

/* Main content wrapper for side-by-side layout */
.main-content-wrapper {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
    max-width: 1200px;
    margin: 2rem auto;
}

/* Benjamin Cretois section - left box */
.intro-section {
    flex: 1;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e67e22;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* About Research section - right box */
.about-research-section {
    flex: 1;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #8e44ad;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(142, 68, 173, 0.1);
}

.about-research-section h2 {
    color: #8e44ad;
    margin-bottom: 1.5rem;
    text-align: left;
}

.about-research-section p {
    line-height: 1.7;
    color: #2c3e50;
    margin-bottom: 1.2rem;
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
    .main-content-wrapper {
        flex-direction: column;
        gap: 2rem;
    }
}

.profile-image-centered {
    width: 260px !important;
    height: 260px !important;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 3px solid rgba(230, 126, 34, 0.2);
    margin-bottom: 1rem;
}

.profile-image-centered img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.intro-text-vertical {
    text-align: center;
    width: 100%;
}

.intro-text-vertical h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 700;
}

.title-subtitle {
    font-size: 1rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.contact-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Inline research focus and languages */
.research-focus-inline {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1.5rem;
}

.research-focus-inline h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    text-align: center;
}

.skills-grid-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.skill-item-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #f1f3f4;
    transition: all 0.3s ease;
}

.skill-item-compact:hover {
    border-color: #e67e22;
    box-shadow: 0 2px 8px rgba(230, 126, 34, 0.1);
}

.skill-item-compact i {
    color: #e67e22;
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.skill-item-compact span {
    color: #2c3e50;
    font-size: 0.85rem;
    font-weight: 500;
}

.languages-inline {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1.5rem;
}

.languages-inline h3 {
    color: #2c3e50;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    text-align: center;
}

.languages-inline p {
    text-align: center;
    margin-bottom: 0;
    font-size: 0.95rem;
}

.fun-facts-inline {
    margin-top: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1.5rem;
}

.fun-facts-inline h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    text-align: center;
}

.fun-facts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.fun-fact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    border: 1px solid #f1f3f4;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.fun-fact-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.05), rgba(142, 68, 173, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.fun-fact-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #e67e22;
}

.fun-fact-item:hover::before {
    opacity: 1;
}

.fact-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e67e22, #f39c12);
    border-radius: 50%;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
    position: relative;
    z-index: 2;
}

.fact-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    position: relative;
    z-index: 2;
}

.fact-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
    margin-bottom: 0;
}

.fact-detail {
    color: #6b7280;
    font-size: 0.8rem;
    margin-bottom: 0;
}

.fact-detail a {
    color: #8e44ad;
    font-weight: 500;
    text-decoration: none;
}

.fact-detail a:hover {
    color: #9b59b6;
    text-decoration: underline;
}

/* Projects */
.projects-section {
    margin-bottom: 3rem;
}

.section-heading {
    color: #2c3e50;
    margin-bottom: 2rem;
    text-align: left;
    border-bottom: 2px solid #e67e22;
    padding-bottom: 0.5rem;
}

.project-subtitle {
    color: #6b7280;
    font-style: italic;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

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

.project-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #f1f3f4;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.project-card:hover::before {
    opacity: 1;
}

.project-category {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.project-card h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.project-card h3 a {
    color: #2c3e50;
    text-decoration: none;
}

.project-card h3 a:hover {
    color: #667eea;
}

.project-card p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.project-links .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Publications */
.publication-item {
    background: #ffffff;
    border: 1px solid #ecf0f1;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.3s ease;
}

.publication-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.publication-item h3 {
    margin-bottom: 0.5rem;
    color: #1a252f;
}

.publication-meta {
    color: #7f8c8d;
    font-style: italic;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.publication-links {
    margin-top: 1rem;
    display: flex;
    gap: 0.75rem;
}

.publication-links a {
    margin-right: 1rem;
    margin-bottom: 0.5rem;
}

.publication-highlight {
    background: #ffffff;
    border: 1px solid #ecf0f1;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Selected Publications */
.selected-publications {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #ecf0f1;
}

.selected-publications h3 {
    color: #1a252f;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.selected-publications .publication-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.selected-publications .publication-item:last-child {
    margin-bottom: 0;
}

/* Page Header */
.page-header {
    text-align: center;
    margin: 3rem 0;
}

.page-description {
    font-size: 1.2rem;
    color: #5a6c7d;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
}

/* Content */
.content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section {
    flex: 1;
}

.footer-section h4 {
    color: #ecf0f1;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section p {
    color: #bdc3c7;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.footer-section a {
    color: #3498db;
    text-decoration: none;
}

.footer-section a:hover {
    color: #5dade2;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #ecf0f1;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: #95a5a6;
    margin: 0;
    font-size: 0.85rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .nav {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid-compact {
        grid-template-columns: 1fr;
    }

    .fun-facts-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
    }

    .social-links {
        justify-content: center;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}