/* Amadou Diabagaté, personal website
   Palette: forest #0F4A38, forest-deep #0A3628, orange #E07A10, sand #EFE8DA, ink #1C211F, muted #59625E */

:root {
    --forest: #0F4A38;
    --forest-deep: #0A3628;
    --orange: #E07A10;
    --orange-text: #A9560A;
    --sand: #EFE8DA;
    --sand-line: #D9CFBB;
    --ink: #1C211F;
    --muted: #59625E;
    --paper: #FFFFFF;
    --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
    --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
    --wrap: 1120px;
    --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='28' viewBox='0 0 96 28'%3E%3Cg fill='none' stroke='%23EFE8DA' stroke-width='2.2' stroke-linecap='square'%3E%3Cpath d='M0 7 L8 2 L16 7 L24 2 L32 7 L40 2 L48 7'/%3E%3Cpath d='M48 21 L56 26 L64 21 L72 26 L80 21 L88 26 L96 21'/%3E%3Cpath d='M60 6 h12 M66 0 v12'/%3E%3Crect x='14' y='16' width='8' height='8'/%3E%3C/g%3E%3Cg fill='%23E07A10'%3E%3Ccircle cx='34' cy='20' r='2.4'/%3E%3Ccircle cx='86' cy='8' r='2.4'/%3E%3C/g%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    font-family: var(--serif);
    font-size: 1.125rem;
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--forest); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--orange-text); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.15; margin: 0 0 .6em; letter-spacing: -0.01em; }
h3 { font-size: 1.3rem; font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }

.skip { position: absolute; left: -999px; top: 0; background: var(--orange); color: #fff; padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 50; background: var(--forest-deep); color: var(--sand); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 1.2rem; color: #fff; text-decoration: none; }
.brand:hover { color: var(--sand); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; }
.site-nav a { font-family: var(--display); font-size: .98rem; font-weight: 500; color: var(--sand); text-decoration: none; padding: .35rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: #fff; }
.site-nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--orange); }
.site-nav .nav-contact { color: #fff; }
.menu-toggle { display: none; font: 600 1rem var(--display); color: #fff; background: transparent; border: 1.5px solid var(--sand); border-radius: 4px; padding: .35rem .9rem; cursor: pointer; }

@media (max-width: 1180px) {
    .menu-toggle { display: inline-block; }
    .site-nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--forest-deep); padding: .5rem 1.25rem 1.25rem; border-top: 1px solid rgba(239,232,218,.2); }
    .site-nav.is-open { display: block; }
    .site-nav ul { flex-direction: column; gap: 0; }
    .site-nav a { display: block; padding: .7rem 0; border-bottom: 1px solid rgba(239,232,218,.15); }
    .site-nav a[aria-current="page"] { border-bottom-color: rgba(239,232,218,.15); color: var(--orange); }
}

/* Language switch */
.topbar__tools { display: flex; align-items: center; gap: .8rem; order: 3; }
.site-nav { order: 2; margin-left: auto; }
.lang-switch { display: flex; border: 1.5px solid rgba(239,232,218,.55); border-radius: 999px; overflow: hidden; font: 600 .85rem var(--display); }
.lang-switch a, .lang-switch span { display: block; padding: .3rem .65rem; line-height: 1.2; text-decoration: none; }
.lang-switch a { color: var(--sand); }
.lang-switch a:hover { background: rgba(239,232,218,.15); color: #fff; }
.lang-switch span { background: var(--sand); color: var(--forest-deep); }

@media (max-width: 1180px) {
    .site-nav { margin-left: 0; }
}

/* Small phones */
@media (max-width: 480px) {
    body { font-size: 1.0625rem; }
    .wrap { width: calc(100% - 2rem); }
    .brand { font-size: 1.05rem; }
    .topbar__tools { gap: .5rem; }
    .hero__lead { font-size: 1.12rem; }
    .hero__actions .btn { flex: 1 1 100%; text-align: center; }
    .section { padding: 3rem 0; }
    .page { padding: 2.2rem 0 3rem; }
    .page-head .wrap { padding: 2.4rem 0 2rem; }
    .page-head__intro { font-size: 1.08rem; }
    .block > h2 { font-size: 1.5rem; }
    .status { margin: .3rem 0 0; }
    .facts { padding: 1rem; }
}

/* Pattern band (bogolan-inspired) */
.pattern-band { height: 28px; background-color: var(--forest-deep); background-image: var(--pattern); background-repeat: repeat-x; background-position: 0 50%; }

/* Hero */
.hero { background: var(--forest); color: var(--sand); }
.hero__grid { display: grid; grid-template-columns: 1.25fr .85fr; gap: 3rem; align-items: end; padding: 4.5rem 0 0; }
.hero__role { font-family: var(--display); font-size: 1.1rem; font-weight: 500; color: #fff; margin-bottom: 1.6rem; }
.hero__role span { display: block; font-weight: 400; color: var(--sand); opacity: .9; font-size: 1rem; margin-top: .2rem; }
.hero__name { font-size: clamp(3.4rem, 9vw, 7rem); line-height: .92; letter-spacing: -0.035em; color: #fff; margin: 0 0 1.8rem; }
.hero__lead { font-size: 1.25rem; line-height: 1.6; max-width: 34em; color: var(--sand); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 2rem 0 3.5rem; }

.btn { display: inline-block; font: 600 1rem var(--display); text-decoration: none; padding: .8rem 1.4rem; border-radius: 999px; border: 2px solid var(--orange); }
.btn--solid { background: var(--orange); color: #1C211F; }
.btn--solid:hover { background: #F08C25; color: #1C211F; }
.btn--line { color: #fff; border-color: var(--sand); }
.btn--line:hover { background: var(--sand); color: var(--forest-deep); }

.hero__portrait { margin: 0; align-self: end; }
.arch { position: relative; aspect-ratio: 720 / 880; border-radius: 999px 999px 0 0; overflow: hidden; background: var(--sand); box-shadow: 14px -14px 0 0 var(--orange); margin-left: auto; max-width: 380px; }
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }

@media (max-width: 820px) {
    .hero__grid { grid-template-columns: 1fr; gap: 0; padding-top: 3rem; }
    .hero__portrait { order: -1; margin-bottom: 2rem; }
    .arch { max-width: 220px; margin-left: 0; box-shadow: 10px -10px 0 0 var(--orange); }
    .hero__actions { margin-bottom: 2.5rem; }
}

/* Inner page head */
.page-head { background: var(--forest); color: var(--sand); }
.page-head .wrap { padding: 3.5rem 0 2.8rem; }
.page-head h1 { color: #fff; font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: -0.03em; margin-bottom: .4em; }
.page-head__intro { font-size: 1.2rem; max-width: 40em; margin: 0; }

/* Sections */
.section { padding: 4.5rem 0; }
.section--sand { background: var(--sand); }
.section__title { font-size: clamp(1.7rem, 3.2vw, 2.3rem); margin-bottom: 1.6rem; }

.themes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 3.5rem; }
.theme { padding: 1.6rem 0 1.4rem; border-top: 2px solid var(--forest); }
.theme p { color: var(--ink); }
.theme a { font-family: var(--display); font-weight: 600; font-size: 1rem; }
@media (max-width: 760px) { .themes { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 4rem; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 2.5rem; } }

.news { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--forest); }
.news li { position: relative; padding: 0 0 1.2rem 1.4rem; }
.news li::before { content: ""; position: absolute; left: -7px; top: .45rem; width: 12px; height: 12px; border-radius: 50%; background: var(--sand); border: 2px solid var(--forest); }
.news li:first-child::before { background: var(--orange); border-color: var(--orange); }
.news time { display: block; font-family: var(--display); font-weight: 600; font-size: .95rem; color: var(--forest); }
.news p { margin: .1rem 0 0; }

.roles { list-style: none; margin: 0; padding: 0; }
.roles li { padding: .8rem 0; border-bottom: 1px solid var(--sand-line); }
.roles li:first-child { padding-top: 0; }

.prose { max-width: 42em; }
.prose--columns { max-width: none; columns: 2 22em; column-gap: 3.5rem; }
.prose--columns p { break-inside: avoid; }
.prose h2 { font-size: 1.7rem; margin-top: 2.2rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .5rem; }

/* Content pages */
.page { padding: 3.5rem 0 4.5rem; }
.page__grid { display: grid; grid-template-columns: 15rem 1fr; gap: 3.5rem; }
.page__aside { position: sticky; top: 90px; align-self: start; font-family: var(--display); font-size: .98rem; }
.page__aside ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--sand-line); }
.page__aside a { display: block; padding: .3rem 0 .3rem 1rem; color: var(--muted); text-decoration: none; }
.page__aside a:hover { color: var(--forest); }
@media (max-width: 860px) { .page__grid { grid-template-columns: 1fr; gap: 1.5rem; } .page__aside { position: static; } .page__aside ul { display: flex; flex-wrap: wrap; gap: .2rem 1rem; border: 0; } .page__aside a { padding: 0; } }

.block { margin-bottom: 3rem; scroll-margin-top: 90px; }
.block > h2 { font-size: 1.8rem; padding-bottom: .5rem; border-bottom: 2px solid var(--forest); }
.block__meta { font-family: var(--display); font-size: .98rem; color: var(--muted); margin-top: -.4rem; }
.block p, .block li { max-width: 44em; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.4rem; margin: 1.2rem 0 1.5rem; padding: 1.1rem 1.3rem; background: var(--sand); border-radius: 6px; font-size: 1rem; }
.facts dt { font-family: var(--display); font-weight: 600; color: var(--forest); }
.facts dd { margin: 0; }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } .facts dd { margin-bottom: .5rem; } }

.status { display: inline-block; font-family: var(--display); font-size: .85rem; font-weight: 600; padding: .1rem .6rem; border-radius: 999px; background: var(--forest); color: #fff; vertical-align: middle; margin-left: .4rem; }
.status--plan { background: transparent; color: var(--forest); border: 1.5px solid var(--forest); }

/* Publications */
.year-group { display: grid; grid-template-columns: 6rem 1fr; gap: 1.5rem; padding: 1.4rem 0; border-top: 1px solid var(--sand-line); }
.year-group:first-of-type { border-top: 0; padding-top: 0; }
.year-group > h3 { font-size: 1.6rem; color: var(--forest); margin: 0; }
.pubs { list-style: none; margin: 0; padding: 0; }
.pub { margin-bottom: 1.3rem; }
.pub__title { display: block; font-weight: 600; line-height: 1.4; }
.pub__authors { display: block; color: var(--muted); font-size: 1rem; }
.pub__venue { display: block; font-size: 1rem; font-style: italic; }
.pub__link { font-family: var(--display); font-size: .92rem; font-style: normal; }
.me { color: var(--ink); text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 3px; }
@media (max-width: 600px) { .year-group { grid-template-columns: 1fr; gap: .5rem; } }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1.2rem; padding: .9rem 0; border-bottom: 1px solid var(--sand-line); }
.timeline .when { font-family: var(--display); font-weight: 600; color: var(--forest); font-size: 1rem; }
.timeline p { margin: 0; }
@media (max-width: 600px) { .timeline li { grid-template-columns: 1fr; gap: .2rem; } }

/* Footer */
.footer { background: var(--forest-deep); color: var(--sand); padding: 3.5rem 0 1.5rem; font-size: 1rem; scroll-margin-top: 64px; }
.footer a { color: #fff; }
.footer a:hover { color: var(--orange); }
.footer__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.footer__title { font-size: 1.15rem; color: #fff; margin-bottom: .7rem; }
.footer__base { border-top: 1px solid rgba(239,232,218,.2); margin-top: 2rem; padding-top: 1.2rem; font-size: .9rem; opacity: .8; }
.footer__base p { margin: 0; }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; } }

.pub__link, .footer a, .facts dd { overflow-wrap: anywhere; }

.count { display: inline-block; font-size: .9rem; font-weight: 600; vertical-align: middle; margin-left: .4rem; padding: .05rem .55rem; border-radius: 999px; background: var(--sand); color: var(--forest); }
.timeline .pub__title { display: block; }
.timeline .pub__authors, .timeline .pub__venue { display: block; }
