/* ── HERO ── */

.hero {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 28px 0;
    border-bottom: 1px solid var(--border);
}

.hero-photo-block {
    flex-shrink: 0;
    margin-left: 2em;
    text-align: center;
}

.photo-dr {
    width: 190px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.13),
                0 0 0 3px var(--surface),
                0 0 0 4px var(--border);
    display: block;
}

.hero-info {
    flex: 1;
}

.hero-info h1 {
    font-size: 1.9em;
    font-weight: 600;
    margin-bottom: 0.15em;
    letter-spacing: -0.01em;
}

.hero-group {
    margin-bottom: 0.5em;
}

.hero-role {
    font-weight: 600;
    font-size: 0.97em;
}

.hero-role-detail {
    font-size: 0.84em;
    color: var(--muted);
    margin-top: 0.1em;
}

.hero-position {
    font-size: 0.97em;
    font-weight: 600;
}

.hero-position-detail {
    font-weight: 400;
    color: var(--muted);
}

.hero-research {
    font-size: 0.92em;
}

.hero-contact {
    font-size: 0.82em;
    color: var(--muted);
    line-height: 1.65;
}

.hero-cv {
    font-size: 0.8em;
    color: var(--muted);
}


/* ── SECTION NAV ── */

.section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}

.section-nav a {
    font-size: 0.82em;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    padding: 5px 11px;
    border-radius: 5px;
    transition: background 0.15s, color 0.15s;
}
.section-nav a:hover {
    background: var(--highlight);
    color: var(--accent);
}
.section-nav a.active {
    color: var(--accent);
    font-weight: 600;
    background: var(--highlight);
}


/* ── TYPOGRAPHY ── */

/* Hide redundant name in header — h1 in hero handles identity; visibility:hidden preserves header height */
.dr-navigation {
    visibility: hidden;
}

/* Toggle moved next to flags on homepage — hide it from the header */
.page-head-container .theme-toggle {
    display: none;
}

h2 {
    font-family: 'EB Garamond', Georgia, serif;
    margin-top: 2.2em;
    margin-bottom: 0.6em;
    font-size: 1.35em;
    font-weight: 600;
    color: var(--text);
    background: none;
    border: none;
    padding: 0;
}


h3 {
    font-family: 'EB Garamond', Georgia, serif;
    color: var(--muted);
    font-weight: 600;
    font-variant: normal;
    margin-top: 1.2em;
    margin-bottom: 0.3em;
    background: none;
    border: none;
    padding: 0;
}

p {
    line-height: 1.7;
}

.detail {
    font-size: 88%;
    color: var(--muted);
}


/* ── INFO BLOCK ── */

.info-block {
    border-left: 3px solid var(--border);
    padding-left: 1em;
    margin-bottom: 1.5em;
}

.spacer-md {
    margin-top: 1.5em;
}


/* ── CONTACT ── */

.contact {
    margin-top: 0.5em;
}

.no-color {
    color: var(--text);
}


/* ── PHD ENTRIES ── */

.phd-entry {
    margin-top: 0.6em;
    margin-left: 1em;
}
.phd-entry .name {
    font-weight: bold;
}
.phd-entry .phd-entry-wrap {
    margin-left: 1em;
    line-height: 1.4;
    font-size: 0.95em;
    color: var(--muted);
}
.phd-entry .phd-entry-wrap .title {
    font-weight: 600;
    color: var(--text);
}
.phd-entry .title {
    font-weight: bold;
}


/* ── RESPONSABILITIES ── */

.responsability {
    margin-top: 2em;
    border: 1px solid var(--border);
    padding: 0.5em;
    border-radius: 8px;
    background-color: var(--bg);
}
.responsability_title {
    font-style: italic;
    font-weight: bold;
    margin-bottom: 1em;
}
.responsability .entry {
    margin-left: 1em;
    margin-top: 0.5em;
}


/* ── RESEARCH AXES ── */

.axis-entry {
    display: flex;
    margin-left: 1em;
    margin-top: 2em;
}

.axis-description-container {
    width: 50%;
}

.axis-video-container {
    width: 50%;
    margin-left: 1em;
}
.axis-video-container video {
    height: 100%;
    width: 100%;
    object-fit: contain;
    object-position: 0% 25%;
}

.project-title {
    font-weight: bold;
    font-size: 110%;
}
.project-elements {
    margin-left: 1em;
}
.project-publications {
    font-size: 90%;
    margin-top: 1em;
    color: var(--muted);
    font-style: italic;
}
.related-publication-text {
    font-weight: bold;
}
.project-publications {
    margin-left: 1em;
}


/* ── NEWS ── */

.news-entry {
    margin-top: 1em;
    display: flex;
    align-items: top;
}

.news-date {
    font-size: 0.8em;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 3px 8px;
    flex-shrink: 0;
    text-align: center;
    white-space: nowrap;
    height: fit-content;
}
.news-entry-detail {
    margin-left: 1em;
    margin-top: 0.25em;
}
.news-keyword {
    font-weight: bold;
}


/* ── LINKS ── */

.explanation-link-subtitle {
    margin-top: 1em;
    font-weight: bold;
}
.explanation-link {
    margin-top: .25em;
}
.explanation-link-detail {
    color: var(--muted);
    margin-left: 1.5em;
    font-size: 88%;
}


/* ── FORMER PHD TOGGLE ── */

#former-phd-title:hover {
    cursor: pointer;
    background-color: var(--surface);
}


/* ── BIO TOGGLE ── */

.toggle-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 85%;
    color: var(--muted);
    cursor: pointer;
    margin-top: 0.5em;
    font-family: inherit;
    transition: border-color 0.2s, color 0.2s;
}
.toggle-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}


/* ── SOCIAL ICONS ── */

.logo-social-network {
    margin-top: 0.6em;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
}
.logo-social-network img {
    height: 26px;
    filter: contrast(70%) opacity(0.8);
    transition: filter 0.2s, transform 0.2s;
}
.logo-social-network a:hover img {
    filter: none;
    transform: scale(1.05);
}


/* ── LANGUAGE FLAG ── */

.language_flag {
    float: right;
    display: flex;
    align-items: center;
    gap: 0.4em;
}
.language_flag img {
    width: 50px;
    margin-left: 0.5em;
    border: 1px solid var(--border);
    border-radius: 5px;
    transition: transform 0.2s, border-color 0.2s, outline-color 0.2s;
}
.language_flag img.active {
    outline: 2px solid var(--text);
}
.language_flag img:hover {
    border: 1px solid var(--accent);
    outline: 2px solid var(--accent);
    transform: scale(1.05);
}


/* ── FOOTER LOGOS ── */

.page-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 40px;
    background: rgba(255, 255, 255, 0.40);
    backdrop-filter: blur(4px);
    border-top: 1px solid rgba(212, 212, 223, 0.3);
    z-index: 100;
}

.footer-logos-right {
    display: flex;
    align-items: center;
    gap: 1.4em;
}

.footer-logo-lix     { height: 44px; opacity: 0.7; transition: opacity 0.2s, transform 0.2s; }
.footer-logo-cnrs    { height: 52px; opacity: 0.7; transition: opacity 0.2s, transform 0.2s; }
.footer-logo-polyipp { height: 52px; opacity: 0.7; transition: opacity 0.2s, transform 0.2s; }

.page-footer a:hover img {
    opacity: 1;
    transform: scale(1.05);
}

body {
    padding-bottom: 80px;
}

a.selectable-shadow:hover img {
    filter: drop-shadow(3px 3px 3px rgba(0,0,0,0.3));
}


/* ── LAYOUT ── */

.layout-short-presentation-photo {
    display: flex;
    justify-content: space-between;
}

.research_description {
    text-align: justify;
}

.subtitle .entry {
    margin-top: 0.25em;
}
.subtitle-link {
    margin-top: 0.5em;
}
.subtitle-link .entry {
    display: inline-block;
}


/* ── RESPONSIVE ── */

/* ── DARK MODE OVERRIDES ── */

[data-theme="dark"] .page-footer {
    background: rgba(24, 24, 31, 0.60);
    border-top-color: rgba(60, 60, 84, 0.5);
}

[data-theme="dark"] .footer-logo-lix,
[data-theme="dark"] .footer-logo-cnrs {
    filter: opacity(0.85);
}
[data-theme="dark"] .footer-logo-polyipp {
    filter: brightness(0) invert(0.85);
}


[data-theme="dark"] .logo-social-network img {
    filter: invert(0.85) opacity(0.75);
}
[data-theme="dark"] .logo-social-network a:hover img {
    filter: invert(0.95);
}


@media (max-width: 1000px) {
    .axis-entry {
        flex-wrap: wrap;
    }
    .axis-description-container,
    .axis-video-container {
        width: 100%;
        margin-left: 0;
        margin-top: 1em;
    }
}

@media (max-width: 650px) {
    .hero {
        flex-direction: column;
        align-items: center;
        gap: 16px;
        clear: right;
    }
    .hero-info {
        width: 100%;
    }
    .hero-photo-block {
        margin-left: 0;
    }
    .photo-dr {
        width: 140px;
    }
    .section-nav a {
        font-size: 0.78em;
        padding: 4px 8px;
    }
    .page-footer {
        padding: 6px 16px;
    }
    .footer-logo-lix     { height: 32px; }
    .footer-logo-cnrs    { height: 38px; }
    .footer-logo-polyipp { height: 38px; }
}
