@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,700;1,400;1,700&display=swap');

:root {
    --primary: #3452ff;
    --primary-hover: #1d39e0;
    --secondary: #dce2ff;
    --dark-grey: #565859;
    --light-grey: #aaacac;
    --border-grey: #e8e8e8;
    --line-grey: #d6d7d8;
    --burgundy: #800145;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--white);
    font-family: Helvetica, Arial, sans-serif;
    font-weight: 400;
    color: var(--dark-grey);
    font-size: 16px;
    line-height: 1.55em;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

::selection {
    background: var(--primary);
    color: var(--white);
}

h1, h2, h3, h4, h5, h6 {
    padding: 0;
    margin: 0;
    font-family: "Lora", Georgia, serif;
    font-weight: 700;
    color: var(--dark-grey);
    line-height: 1.35em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

a:hover, a:active {
    color: var(--primary-hover);
    text-decoration: none;
}

h1 a, h2 a, h3 a, h4 a {
    color: var(--primary);
    text-decoration: none;
}

h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover {
    color: var(--primary-hover);
}

p {
    margin: 0 0 1em 0;
}

hr {
    height: 2px;
    width: 100%;
    border: 0;
    background-color: var(--border-grey);
    margin: 1.5em 0;
    clear: both;
}

/* Header & Navigation */
.main-header-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: var(--white);
    box-shadow: 0 1px 5px 2px rgba(0, 0, 0, 0.1);
}

.main-header {
    max-width: 1120px;
    margin: 0 auto;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--white);
}

.site-logo a {
    font-family: "Lora", Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.01em;
    text-decoration: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.site-logo img.header-univ-logo {
    height: 32px;
    width: auto;
    display: block;
}

.site-logo a:hover {
    color: var(--primary-hover);
}

.main-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    font-size: 18px;
}

.main-nav li {
    margin: 0;
}

.main-nav a {
    display: block;
    padding: 0 20px;
    line-height: 30px;
    font-family: "Lora", Georgia, serif;
    font-weight: 400;
    color: var(--dark-grey);
    text-decoration: none;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
}

/* Main Content Layout */
.main-content {
    width: 100%;
    max-width: 1020px;
    margin: 105px auto 40px auto;
    padding: 20px;
    flex: 1;
}

.main-col {
    background-color: var(--white);
    max-width: 760px;
    margin: 0 auto;
    width: 100%;
}

.main-col.large {
    max-width: 1020px;
}

/* Page Title */
.entry-title {
    font-size: 1.7em;
    font-weight: 700;
    padding-bottom: 20px;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-grey);
}

/* Entry Content Typography */
.entry-content h2 {
    font-family: "Lora", Georgia, serif;
    font-size: 1.65em;
    font-weight: 400;
    margin-top: 1.2em;
    margin-bottom: 0.8em;
}

.entry-content h2:first-child,
.entry-content h3:first-child,
.entry-content h4:first-child {
    margin-top: 0;
}

.entry-content h3 {
    font-size: 1.2em;
    margin-top: 1.2em;
    margin-bottom: 0.6em;
}

.entry-content h4 {
    font-size: 1em;
    margin-bottom: 0.6em;
    font-weight: 700;
}

.entry-content ul {
    margin: 0.6em 0 1em 20px;
    padding: 0;
    list-style: disc;
}

.entry-content li {
    margin-bottom: 0.6em;
}

/* Homepage Two-Column Layout (Left sidebar + Main content) */
.home-columns {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
}

.home-sidebar {
    width: 30%;
    min-width: 240px;
    text-align: center;
}

.home-main {
    width: 66%;
}

.portrait-circle {
    border-radius: 100%;
    overflow: hidden;
    margin: 0 auto 30px auto;
    width: 185px;
    height: 185px;
    background-color: #f2f5f5;
    border: 2px solid var(--border-grey);
}

.portrait-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.widget-title {
    font-family: "Lora", Georgia, serif;
    font-size: 0.85em;
    text-transform: uppercase;
    color: var(--dark-grey);
    letter-spacing: 0.07em;
    margin-bottom: 1em;
}

.contact-widget p {
    margin-bottom: 0.9em;
    font-size: 0.95em;
}

.univ-logo-box {
    margin: 0 auto 16px auto;
}

.univ-logo-box img {
    height: 42px;
    width: auto;
    display: inline-block;
    transition: opacity 0.2s ease;
}

.univ-logo-box a:hover img {
    opacity: 0.8;
}

.social-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 1.2em;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 40px;
    padding: 0 14px;
    border-radius: 30px;
    border: 2px solid var(--border-grey);
    background-color: var(--white);
    color: var(--dark-grey);
    font-size: 0.88em;
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.15s ease, color 0.2s ease;
}

.icon-btn img {
    height: 20px;
    width: auto;
    display: block;
}

.icon-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    text-decoration: none;
}

.pill-btn, .btn {
    display: inline-block;
    line-height: 32px;
    padding: 0 1em;
    border-radius: 30px;
    border: 2px solid var(--border-grey);
    background-color: var(--white);
    color: var(--dark-grey);
    font-size: 0.9em;
    text-decoration: none;
}

.pill-btn:hover, .btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    text-decoration: none;
}

.btn-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    font-weight: 700;
}

.btn-primary:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* NEW label badge */
.new-label {
    display: inline-block;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 0.85em;
    background-color: var(--burgundy);
    color: var(--white);
    border-radius: 3px;
    padding: 1px 7px;
    font-weight: 700;
    margin-right: 6px;
    vertical-align: baseline;
    line-height: 1.4;
}

/* Research Two-Column Layout (Main content + Right Table of Contents) */
.research-columns {
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
}

.toc-sidebar {
    width: 28%;
    min-width: 210px;
    position: sticky;
    top: 100px;
}

.research-main {
    width: 68%;
}

.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc-list li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-grey);
}

.toc-list a {
    color: var(--dark-grey);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92em;
}

.toc-list a:hover {
    color: var(--primary);
}

/* Research Publication Items */
.pub-list .item-list {
    margin-bottom: 22px;
    padding-bottom: 22px;
    border-bottom: 2px solid var(--border-grey);
}

.pub-list .item-list:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.pub-title p {
    margin-bottom: 6px;
}

.pub-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 6px;
    font-size: 0.95em;
}

.pub-links > div,
.pub-links > span {
    line-height: 1.2em;
    margin-bottom: 4px;
}

.pub-links > div:not(:last-child),
.pub-links > span:not(:last-child) {
    margin-right: 10px;
    padding-right: 10px;
    border-right: 1px solid var(--light-grey);
}

.abstract-toggle {
    cursor: pointer;
    user-select: none;
}

.abstract-toggle .arrow {
    display: inline-block;
    width: 0.8em;
    font-size: 0.85em;
    transition: transform 0.2s ease;
}

.abstract-toggle.open {
    color: var(--light-grey);
}

.abstract-toggle.open .arrow {
    transform: rotate(90deg);
}

.abstract-content {
    margin-top: 12px;
    display: none;
    color: var(--dark-grey);
    font-size: 0.95em;
    line-height: 1.55em;
}

.abstract-content.open {
    display: block;
}

/* Media + Text side-by-side layout (inspired by juliacage.com wp-block-media-text) */
.media-block {
    display: grid;
    grid-template-columns: 165px 1fr;
    gap: 24px;
    align-items: start;
}

.media-block.cover-block {
    grid-template-columns: 130px 1fr;
}

.media-block-img {
    margin: 0;
}

.media-block-img img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid var(--border-grey);
    transition: opacity 0.2s ease;
}

.media-block-img a:hover img {
    opacity: 0.88;
}

.media-block-content > h3:first-child,
.media-block-content > h4:first-child,
.media-block-content > p:first-child {
    margin-top: 0;
}

.media-block-content p:last-child {
    margin-bottom: 0;
}

/* CV iframe */
.cv-frame {
    width: 100%;
    height: 750px;
    border: 2px solid var(--border-grey);
    margin-top: 1.2em;
}

/* Footer with horizontal line through the middle */
.main-footer {
    position: relative;
    text-align: left;
    padding: 20px 40px;
    margin-top: 40px;
}

.main-footer::before {
    content: '';
    top: 50%;
    left: 0;
    right: 0;
    width: 100%;
    height: 2px;
    background: var(--line-grey);
    position: absolute;
    z-index: 0;
}

.main-footer-container {
    position: relative;
    z-index: 1;
    background-color: var(--white);
    display: inline-block;
}

.main-footer-infos {
    padding: 10px 20px 10px 0;
    font-family: "Lora", Georgia, serif;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.95em;
    color: var(--dark-grey);
}

.main-footer-infos p {
    margin: 0;
}

.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.footer-nav li {
    display: inline-block;
}

.footer-nav li::before {
    content: '•';
    font-size: 0.7rem;
    color: var(--light-grey);
    display: inline-block;
    margin: 0 10px;
}

.footer-nav a {
    color: var(--primary);
    text-decoration: none;
}

.footer-nav a:hover {
    color: var(--primary-hover);
}

/* Responsive */
@media screen and (max-width: 820px) {
    .main-header {
        flex-direction: column;
        padding: 15px 20px;
        gap: 10px;
    }

    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
        font-size: 16px;
    }

    .main-nav a {
        padding: 4px 12px;
    }

    .main-content {
        margin-top: 120px;
    }

    .home-columns {
        flex-direction: column-reverse;
        gap: 30px;
    }

    .home-sidebar,
    .home-main {
        width: 100%;
    }

    .home-sidebar {
        background-color: var(--border-grey);
        padding: 30px 20px;
    }

    .pill-btn {
        background-color: var(--white);
    }

    .research-columns {
        flex-direction: column;
        gap: 20px;
    }

    .toc-sidebar,
    .research-main {
        width: 100%;
        position: static;
    }

    .media-block,
    .media-block.cover-block {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .media-block-img {
        max-width: 220px;
    }
}
