/* boussalc.xyz — one serif column, a left menu, one blue accent. */

/* Newsreader (Production Type, SIL Open Font License; see fonts/OFL.txt), self-hosted. */
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/newsreader-italic-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/newsreader-italic-latin.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: "Newsreader";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/newsreader-normal-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/newsreader-normal-latin.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;
}


:root {
  --bg: #ffffff;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --rule: #e3e3e3;
  --accent: #2b7bbd;
  --accent-ink: #1f5f94;
  --serif: "Newsreader", "Charter", "Bitstream Charter", "Sitka Text", Cambria, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs: 17px;
  --lh: 1.45;
  --side-w: 232px;
  --col-w: 700px;
  --bar-h: 56px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131313;
    --ink: #e6e6e6;
    --muted: #9a9a9a;
    --rule: #2c2c2c;
    --accent: #5aa9e6;
    --accent-ink: #8cc4f0;
  }
}
:root[data-theme="dark"] {
  --bg: #131313;
  --ink: #e6e6e6;
  --muted: #9a9a9a;
  --rule: #2c2c2c;
  --accent: #5aa9e6;
  --accent-ink: #8cc4f0;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs);
  line-height: var(--lh);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
}
a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}
a:hover { color: var(--accent-ink); }
p { margin: 0 0 1em; }
em { font-style: italic; }
h1, h2, h3 { font-weight: 400; line-height: 1.2; margin: 0; }
h1 { font-size: 34px; letter-spacing: -0.005em; }
h2 { font-size: 24px; padding-bottom: 6px; border-bottom: 1px solid var(--rule); margin-bottom: 18px; }
h3 { font-size: 18px; margin: 26px 0 8px; }

.skip { position: absolute; left: -999px; top: 8px; }
.skip:focus { left: 8px; background: var(--bg); padding: 6px 10px; z-index: 30; }

/* Side menu */
.side {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--side-w);
  padding: 44px 28px 32px;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.4;
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 30px;
  background: var(--bg);
  overflow-y: auto;
  z-index: 20;
}
.side-top { display: flex; align-items: center; justify-content: space-between; }
.side-name a { color: var(--ink); text-decoration: none; font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1.15; letter-spacing: -0.005em; display: inline-block; }
.menu-toggle { display: none; }
.side-menu { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.side-nav, .side-links { list-style: none; margin: 0; padding: 0; }
.side-nav li { margin: 0 0 10px; }
.side-nav a {
  color: var(--muted);
  text-decoration: none;
  display: inline-block;
  padding-left: 10px;
  margin-left: -12px;
  border-left: 2px solid transparent;
}
.side-nav a:hover { color: var(--ink); }
.side-nav a.active { color: var(--accent); border-left-color: var(--accent); }
.side-links { margin-top: auto; padding-top: 24px; display: flex; flex-wrap: wrap; gap: 6px 10px; }
.side-links a { display: inline-flex; color: var(--muted); text-decoration: none; padding: 2px; }
.side-links a:hover, .side-links a:focus-visible { color: var(--accent); }
.side-links svg { width: 20px; height: 20px; display: block; fill: currentColor; }

/* Content column */
.content { margin-left: var(--side-w); padding: 60px 56px 80px; }
.content > * { max-width: var(--col-w); }
.masthead .role { font-family: var(--sans); font-size: 14px; color: var(--muted); margin: 10px 0 0; line-height: 1.5; }
section { margin-top: 60px; scroll-margin-top: 24px; }
section:first-of-type { margin-top: 48px; }
.note { font-family: var(--sans); font-size: 13.5px; color: var(--muted); }

/* Portrait */
.portrait { float: right; width: 212px; margin: 6px 0 18px 32px; }
.portrait img { display: block; width: 100%; height: auto; }
.portrait figcaption { font-family: var(--sans); font-size: 12px; color: var(--muted); margin-top: 6px; }
.clear { clear: both; }

/* Rows with a label on the left: publications, positions, education */
.rows { list-style: none; margin: 0; padding: 0; }
.row {
  display: grid;
  grid-template-columns: 4.25em 1fr;
  gap: 0 14px;
  padding: 10px 0;
  border-top: 1px solid var(--rule);
}
.rows.wide .row { grid-template-columns: 7.5em 1fr; }
.row:last-child { border-bottom: 1px solid var(--rule); }
h2 + .rows > .row:first-child { border-top: 0; }   /* the heading's rule already draws that line */
.row-label {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  padding-top: 4px;
  font-variant-numeric: tabular-nums;
}
.row-body > span { display: block; }
.pub-authors b { font-weight: 600; }
.pub-venue { color: var(--muted); }
.pub-extras { font-family: var(--sans); font-size: 13px; margin-top: 3px; }
.pub-extras > * + *::before { content: "\00b7"; margin: 0 8px; color: var(--muted); }

.linklike {
  background: none; border: 0; padding: 0; margin: 0;
  color: var(--accent); font: inherit; cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.14em;
}
.linklike:hover { color: var(--accent-ink); }

ul.plain { list-style: none; margin: 0 0 1em; padding: 0; }
ul.plain li { margin: 0 0 6px; }
ul.bullets { margin: 0 0 1em 1.1em; padding: 0; }
ul.bullets li { margin: 0 0 4px; }

address { font-style: normal; }

/* Modals */
dialog {
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 26px 30px 30px;
  max-width: 640px;
  width: calc(100% - 32px);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: var(--lh);
}
dialog::backdrop { background: rgba(0, 0, 0, 0.38); }
.modal-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 12px; }
.modal-head h3 { margin: 0; font-size: 20px; }
.modal-close { font-family: var(--sans); font-size: 13px; color: var(--muted); background: none; border: 0; cursor: pointer; padding: 0; }
.modal-close:hover { color: var(--accent); }
dialog .source { font-family: var(--sans); font-size: 12.5px; color: var(--muted); margin: 14px 0 0; }
dialog ul { margin: 0 0 0.8em 1.1em; padding: 0; }
dialog li { margin: 0 0 5px; }

footer {
  margin-top: 72px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
}
footer .linklike { font-size: inherit; }

/* Paper landing pages */
.paper-meta { font-family: var(--sans); font-size: 14px; color: var(--muted); }
.paper-abstract { margin-top: 18px; }
.paper-pdf { font-family: var(--sans); font-size: 14px; margin: 18px 0; }
.paper-license { font-family: var(--sans); font-size: 13px; color: var(--muted); margin-top: 24px; }

/* Phones and narrow windows: a sticky top bar with a hamburger menu */
@media (max-width: 900px) {
  .side {
    position: sticky;
    top: 0;
    width: auto;
    padding: 0;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    display: block;
    gap: 0;
    overflow: visible;
  }
  .side-top { min-height: var(--bar-h); padding: 0 12px 0 20px; }
  .side-name br { display: none; }
  .side-name a { font-size: 19px; }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    background: none; border: 0; padding: 0; margin: 0;
    color: var(--ink); cursor: pointer;
  }
  .menu-toggle svg { width: 24px; height: 24px; fill: currentColor; }
  .menu-toggle .icon-close { display: none; }
  .side.open .menu-toggle .icon-burger { display: none; }
  .side.open .menu-toggle .icon-close { display: block; }
  .side-menu { display: none; }
  .side.open .side-menu {
    display: flex;
    flex-direction: column;
    padding: 14px 20px 18px;
    border-top: 1px solid var(--rule);
    background: var(--bg);
  }
  .side-nav li { margin: 0 0 12px; }
  .side-nav a { font-size: 16px; }
  .side-links { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--rule); gap: 8px 18px; }
  .side-links svg { width: 22px; height: 22px; }
  .content { margin-left: 0; padding: 28px 20px 60px; }
  section { margin-top: 44px; scroll-margin-top: calc(var(--bar-h) + 12px); }
  .portrait { width: 150px; margin: 4px 0 12px 20px; }
  h1 { font-size: 30px; }
  .row { grid-template-columns: 3.6em 1fr; }
  .rows.wide .row { grid-template-columns: 6.5em 1fr; }
}
@media (max-width: 480px) {
  .portrait { float: none; width: 160px; margin: 0 0 16px; }
}
@media print {
  .side { display: none; }
  .content { margin: 0; padding: 0; }
  a { color: inherit; text-decoration: none; }
}
