/* Salma Lemkhente — academic website. One page; Source Serif 4 (self-hosted, SIL OFL); one accent colour; light and dark. */
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(fonts/source-serif-4-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 200 900; font-display: swap;
  src: url(fonts/source-serif-4-latin-wght-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(fonts/source-serif-4-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 200 900; font-display: swap;
  src: url(fonts/source-serif-4-latin-ext-wght-italic.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #fbfaf7;           /* warm off-white */
  --ink: #1c1e21;
  --muted: #3e434a;
  --faint: #6b7078;
  --line: #e4e0d8;         /* hairline */
  --accent: #1f4e79;       /* deep ink blue, same as the CV */
  --accent-soft: #f0f3f6;
  --serif: "Source Serif 4", Charter, "Sitka Text", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121417; --ink: #e8e6e1; --muted: #a6acb4; --faint: #7d838b; --line: #2a2e34;
          --accent: #9cbde0; --accent-soft: #19212a; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 18px/1.62 var(--serif); font-optical-sizing: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
p { margin: 0 0 12px; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(140%) blur(6px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1040px; margin: 0 auto; padding: 12px 32px; display: flex; justify-content: space-between; align-items: baseline; }
.brand { font-weight: 600; color: var(--ink); letter-spacing: 0.01em; }
.nav-links { display: flex; gap: 22px; font: 500 0.82rem/1 var(--sans); letter-spacing: 0.04em; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--accent); text-decoration: none; }

main { max-width: 1040px; margin: 0 auto; padding: 56px 32px 48px; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1fr 300px; gap: 56px; align-items: start; margin-bottom: 56px; }
h1 { font-size: 2.6rem; line-height: 1.08; font-weight: 600; letter-spacing: -0.015em; margin: 4px 0 14px; }
.role { color: var(--muted); font-size: 1.02rem; line-height: 1.5; margin-bottom: 14px; }
.market { font: 600 0.8rem/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.summary { font-size: 1.08rem; max-width: 38em; }
.fields { color: var(--muted); font-size: 0.95rem; font-style: italic; margin-bottom: 22px; }
.actions { display: flex; gap: 10px; margin-bottom: 16px; }
.btn { font: 600 0.85rem/1 var(--sans); letter-spacing: 0.03em; padding: 11px 20px; border-radius: 6px;
  border: 1px solid var(--accent); color: var(--accent); }
.btn:hover { text-decoration: none; background: var(--accent-soft); }
.btn.primary { background: var(--accent); color: var(--bg); }
.btn.primary:hover { filter: brightness(1.12); background: var(--accent); }
.ids { font: 0.85rem/1.6 var(--sans); }
.ids a { color: var(--muted); margin-right: 16px; }
.ids a:hover { color: var(--accent); }
.portrait { display: block; width: 300px; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; margin-top: 6px; }

/* ---------- sections ---------- */
section { border-top: 1px solid var(--line); padding-top: 30px; margin-top: 36px; }
h2 { font: 600 0.78rem/1 var(--sans); text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); margin: 0 0 26px; }
.group { font: 600 0.78rem/1 var(--sans); text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); margin: 34px 0 16px; }

/* ---------- papers ---------- */
.paper { margin-bottom: 26px; }
.paper h3 { font-size: 1.12rem; line-height: 1.38; font-weight: 600; margin: 0 0 4px; }
.paper h3 a { color: var(--ink); }
.paper h3 a:hover { color: var(--accent); }
.authors { color: var(--muted); font-size: 0.97rem; margin-bottom: 4px; }
.pres { color: var(--faint); font-size: 0.92rem; font-style: italic; margin-bottom: 6px; }
.links { font: 500 0.83rem/1 var(--sans); display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0 6px; }
.jmp { background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; padding: 22px 26px 16px; margin-bottom: 8px; }
.jmp .label { font: 600 0.74rem/1 var(--sans); text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); margin-bottom: 10px; }
.jmp h3 { font-size: 1.28rem; }
.result { font-size: 1rem; margin: 10px 0 6px; }
.result span { font-weight: 600; }
details { margin-top: 2px; }
summary { cursor: pointer; width: max-content; list-style: none; font: 500 0.83rem/1.8 var(--sans); color: var(--accent); }
summary::-webkit-details-marker { display: none; }
summary::before { content: ""; display: inline-block; margin: 0 8px 1px 1px; vertical-align: middle;
  border-left: 5px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent; transition: transform .15s ease; }
details[open] summary::before { transform: rotate(90deg); }
details p { font-size: 0.98rem; margin-top: 6px; max-width: 52em; }

/* ---------- teaching ---------- */
.teach { margin-bottom: 20px; }
.teach-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-weight: 600; }
.teach-head span:last-child { font-weight: 400; color: var(--muted); font-size: 0.93rem; font-style: italic; }
.teach ul { margin: 4px 0 0; padding-left: 18px; color: var(--muted); font-size: 0.97rem; }
.teach li { margin: 2px 0; }

/* ---------- references ---------- */
.refs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.refs p { font-size: 0.95rem; line-height: 1.55; margin: 0; color: var(--muted); }
.refs .ref-name { color: var(--ink); font-weight: 600; font-size: 1rem; margin-bottom: 4px; }
.ref-name a { color: var(--ink); }
.ref-name span { display: block; font-weight: 400; font-style: italic; color: var(--faint); font-size: 0.88rem; }
.refs > div:not(:has(.ref-name span)) .ref-name { margin-bottom: calc(4px + 0.88rem * 1.55); }   /* keep the three columns aligned */

footer { margin-top: 64px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--faint); font: 0.82rem/1.7 var(--sans); }
footer p { margin: 0; }

/* ---------- small screens ---------- */
@media (max-width: 720px) {
  body { font-size: 17px; }
  main { padding: 32px 20px 40px; }
  .topbar-inner { padding: 10px 20px; }
  .brand { display: none; }
  .nav-links { gap: 18px; width: 100%; justify-content: space-between; }
  .hero { grid-template-columns: 1fr; gap: 22px; margin-bottom: 40px; }
  .hero picture { order: -1; }
  .portrait { width: 150px; border-radius: 50%; aspect-ratio: 1; }
  h1 { font-size: 2.1rem; }
  .refs { grid-template-columns: 1fr; gap: 20px; }
  .jmp { padding: 18px 18px 12px; }
}
@media print { .topbar, .actions { display: none; } body { background: #fff; } main { padding: 0; } }
.role .unit { font-size: 0.93rem; color: var(--faint); }
.teach-intro { font-size: 1rem; margin-bottom: 22px; max-width: 46em; }
