/* Very Smol Reset */
* {
  box-sizing: border-box;
  margin: 0;
}

/* Layout */

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 5vh clamp(1rem, 5vw, 3rem) 1rem;
  font-family: system-ui, sans-serif;
  line-height: 1.5;
  color: #222;
}

body > * {
  --layout-spacing: max(8vh, 3rem);
  --max-width: 70ch;
  width: min(100%, var(--max-width));
  margin-left: auto;
  margin-right: auto;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  margin-left: -1rem;
  margin-right: -1rem;
}

nav ul li {
  padding: 0.5rem 1rem;
}

nav [aria-current="page"] {
  font-weight: bold;
}

header,
main,
main > * + * {
  margin-top: var(--layout-spacing);
}

body > footer {
  margin-top: auto;
  padding-top: var(--layout-spacing);
}

body > footer div {
  border-top: 1px solid #ccc;
  padding-top: 0.5em;
  font-size: 0.9rem;
  color: #767676;
}

article * + * {
  margin-top: 1em;
}

/* Typography */
:is(h1, h2, h3) {
  line-height: 1.2;
}

:is(h1, h2) {
  max-width: 40ch;
}

:is(h2, h3):not(:first-child) {
  margin-top: 2em;
}

a {
  color: navy;
  text-underline-offset: 0.08em;
}

a:focus {
  outline: 1px solid currentColor;
  outline-offset: 0.2em;
}

/* Media */

article img {
  display: block;
  width: 100%;
  min-height: 20rem;
  max-height: 40vh;
  object-fit: cover;
  margin: 2rem auto;
}

@supports (aspect-ratio: 1) {
  article img {
    max-height: unset;
    aspect-ratio: 3/2;
  }
}

/* Supporting Content */

code:not([class*="language"]) {
  font-family: Consolas, Monaco, Andale Mono, Ubuntu Mono, monospace;
  font-size: 1.75ex;
  color: #444;
  background-color: rgba(0, 0, 0, 0.1);
  padding-right: 0.15em;
  padding-left: 0.15em;
}

blockquote {
  margin: 2rem 0;
  padding: 0.5em 1rem;
  border-left: 3px solid rgba(0, 0, 0, 0.35);
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 0 0.25rem 0.25rem 0;
}

:root {
  --bg: #F3EEFA;
  --text: #1C1A22;
  --text-gray: #3F3D46;
  --text-muted: #5B5865;
  --purple: #4B2A7B;
  --purple-hover: #6B3FA8;
  --border: #D8CCEB;
}

body {
  background: var(--bg);
  color: var(--text);
}

h1, h2, h3 { color: var(--purple); }

a { color: var(--purple); }
a:hover { color: var(--purple-hover); }

/* Publications */
.pub { border-left-color: var(--border); }
a {
  color: var(--purple);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
a:hover { color: var(--purple-hover); text-decoration-thickness: 2px; }

.pub-authors { color: var(--text-gray); }
.pub-authors strong { color: var(--purple); }
.pub-meta { color: var(--text-muted); }

body { font-family: "Radio Canada", system-ui, sans-serif; line-height: 1.6; }
h1, h2, h3 { font-family: inherit; font-weight: 600; }

/* Navigation buttons */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: 52rem;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 0;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  color: var(--purple);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.2;
}
.site-nav a:hover { background: #E6DCF4; }
.site-nav a[aria-current="page"] { background: #E6DCF4; font-weight: 600; }
.site-nav a:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }