/* ==========================================================================
   kyle.van-gaeveren.be: ink-on-paper typography with a single accent.
   The accent (rgb 180 49 62) is the colour of the dissertation and slides;
   it is reserved for links, the active nav item, year labels and focus.
   ========================================================================== */

/* --- Typeface: Charis SIL (OFL), a Charter descendant, self-hosted ------- */

@font-face {
  font-family: "Charis SIL";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/charis-sil-latin-400-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: "Charis SIL";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/charis-sil-latin-400-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: "Charis SIL";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/charis-sil-latin-700-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: "Charis SIL";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/charis-sil-latin-700-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;
}
/* Latin Extended (co-author names such as Šaradín, Šmahel) */
@font-face {
  font-family: "Charis SIL";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/charis-sil-latin-ext-400-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: "Charis SIL";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/charis-sil-latin-ext-400-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;
}
@font-face {
  font-family: "Charis SIL";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/charis-sil-latin-ext-700-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: "Charis SIL";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/charis-sil-latin-ext-700-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;
}

/* --- Tokens --------------------------------------------------------------- */

:root {
  --paper: #ffffff;
  --ink: #1a1a1a;          /* body text, headings            17.4:1 */
  --ink-2: #3b3b3b;        /* authors, secondary prose       11.2:1 */
  --ink-3: #5c5c5c;        /* dates, metadata, labels         6.7:1 */
  --rule: #e4e0dd;         /* hairlines between groups */
  --rule-strong: #1a1a1a;  /* section rules */
  --accent: #b4313e;       /* rgb(180 49 62)                  6.1:1 */
  --accent-strong: #8e2430;
  --accent-wash: #f7e3e5;  /* text selection */

  --font-serif: "Charis SIL", "Charter", "Georgia", serif;

  /* Bootstrap reads these, so chrome Quarto draws follows the palette too */
  --bs-body-bg: var(--paper);
  --bs-body-color: var(--ink);
  --bs-link-color: var(--accent);
  --bs-link-hover-color: var(--accent-strong);
  --bs-border-color: var(--rule);
  --bs-font-sans-serif: var(--font-serif);

  --toggler-filter: invert(1);  /* Quarto's hamburger icon is drawn light */
}

/* Night edition: follows the system setting unless the visitor picked a theme
   with the navbar toggle (stored as data-theme on <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
      --paper: #171515;
      --ink: #ebe7e4;
      --ink-2: #cbc5c1;
      --ink-3: #a39c98;
      --rule: #34302e;
      --rule-strong: #8d8682;
      --accent: #ea7e86;
      --accent-strong: #f3a3a9;
      --accent-wash: #4a2226;
      --toggler-filter: none;
      color-scheme: dark;
  }
}

:root[data-theme="dark"] {
    --paper: #171515;
    --ink: #ebe7e4;
    --ink-2: #cbc5c1;
    --ink-3: #a39c98;
    --rule: #34302e;
    --rule-strong: #8d8682;
    --accent: #ea7e86;
    --accent-strong: #f3a3a9;
    --accent-wash: #4a2226;
    --toggler-filter: none;
    color-scheme: dark;
}

/* --- Base ----------------------------------------------------------------- */

body {
  font-family: var(--font-serif);
  background-color: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  accent-color: var(--accent);
  caret-color: var(--accent);
  font-variant-numeric: oldstyle-nums proportional-nums;
}

::selection {
  background: var(--accent-wash);
  color: var(--ink);
}

h1, h2, h3, h4, .navbar, .title {
  font-family: var(--font-serif);
  color: var(--ink);
  text-wrap: balance;
}

h1.title {
  margin-bottom: 0;
  font-size: 2rem;
  line-height: 1.25;
}

.subtitle {
  color: var(--ink-3);
  margin-top: 0.2rem;
}

h2 {
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 0.25rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin-top: 1.6rem;
  margin-bottom: 0.35rem;
}

p, li, dd {
  text-wrap: pretty;
}

/* --- Links: one style everywhere ----------------------------------------- */

main a,
.contact-line a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
  text-underline-offset: 0.18em;
  transition: text-decoration-color 120ms ease-out, color 120ms ease-out;
}

main a:hover,
.contact-line a:hover {
  color: var(--accent-strong);
  text-decoration-color: currentColor;
}

a:focus-visible,
summary:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Quarto's hover anchors on headings */
.anchorjs-link {
  color: var(--ink-3) !important;
  text-decoration: none !important;
}

/* --- Page header (About) -------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1.75rem;
  align-items: center;
  margin: 0.5rem 0 2.25rem;
}

.hero-photo {
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 50%;
  object-fit: cover;
  margin: 0;
}

.hero p {
  margin: 0;
}

.hero h1 {
  font-size: 2.1rem;
  line-height: 1.15;
  margin: 0 0 0.3rem;
  border: 0;
}

.hero-role {
  color: var(--ink-2);
  font-size: 1.05rem;
}

.hero-links {
  margin-top: 0.55rem !important;
  font-size: 0.95rem;
  color: var(--ink-3);
}

.hero-links a {
  white-space: nowrap;
}

@media (max-width: 520px) {
  .hero {
    grid-template-columns: 4.25rem 1fr;
    gap: 0.9rem;
    align-items: start;
  }

  .hero-photo {
    width: 4.25rem;
    height: 4.25rem;
  }

  .hero h1 {
    font-size: 1.45rem;
  }

  .hero-role {
    font-size: 0.98rem;
  }

  /* Comfortable tap rows for the profile links on phones */
  .hero-links {
    line-height: 2.1;
  }
}

/* --- Dated lists: News, Projects ---------------------------------------- */

.news dl,
.dated dl {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.6rem 1.25rem;
  margin: 0;
}

.news dt,
.dated dt {
  font-weight: 400;
  font-size: 0.875rem;
  color: var(--ink-3);
  font-variant-numeric: lining-nums tabular-nums;
  padding-top: 0.12rem;
}

.news dd,
.dated dd {
  margin: 0;
}

.dated dd {
  margin-bottom: 0.6rem;
}

.dated .project-name {
  font-weight: 700;
}

.dated .project-links {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.875rem;
  color: var(--ink-3);
}

.dated .project-meta {
  display: block;
  font-size: 0.875rem;
  color: var(--ink-3);
  margin-bottom: 0.2rem;
}

@media (max-width: 520px) {
  .news dl,
  .dated dl {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .news dd,
  .dated dd {
    margin-bottom: 0.9rem;
  }
}

/* --- CV header ------------------------------------------------------------ */

.contact-line {
  color: var(--ink-3);
  margin-top: 0.3rem;
}

.pdf-link {
  font-size: 0.875rem;
}

/* --- Publications --------------------------------------------------------- */

.pub-year {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent) !important;
  text-transform: none;
  letter-spacing: 0.06em;
  font-variant-numeric: lining-nums;
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid var(--rule);
  opacity: 1;  /* Bootstrap fades h3 to 0.9 */
}

.pub-entry {
  margin: 0 0 1.1rem 0;
}

.pub-title {
  display: block;
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.35;
}

.pub-authors {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.92rem;
  color: var(--ink-2);
}

.pub-authors strong {
  color: var(--ink);
}

.pub-meta {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.92rem;
  color: var(--ink-3);
}

.pub-venue {
  font-style: italic;
}

.pub-link {
  overflow-wrap: anywhere;
}

.pub-type {
  display: inline-block;
  margin-left: 0.4rem;
  font-size: 0.75rem;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  white-space: nowrap;
}

.pub-extra {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.875rem;
}

.pub-extra .pub-link + .pub-link {
  margin-left: 0.75rem;
}

.pub-abstract {
  margin-top: 0.3rem;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.pub-abstract summary {
  cursor: pointer;
  color: var(--ink-3);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  padding: 0.2rem 0;
}

.pub-abstract summary:hover {
  color: var(--accent);
}

.pub-abstract[open] summary {
  color: var(--ink);
}

.pub-abstract p {
  margin: 0.35rem 0 0.4rem;
  max-width: 68ch;
  padding-left: 0.9rem;
  border-left: 1px solid var(--rule);
}

/* --- Skills (CV) ---------------------------------------------------------- */

.skills dl {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.35rem 1rem;
  margin: 0;
}

.skills dt {
  font-weight: 700;
  font-size: 0.92rem;
}

.skills dd {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-2);
}

@media (max-width: 480px) {
  .skills dl {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .skills dd {
    margin-bottom: 0.6rem;
  }
}

/* --- Site chrome: navbar and footer -------------------------------------- */

.navbar {
  background-color: var(--paper) !important;
  border-bottom: 1px solid var(--rule);
}

.navbar .navbar-brand,
.navbar .navbar-title,
.navbar .nav-link {
  color: var(--ink) !important;
}

.navbar .nav-link {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  transition: text-decoration-color 120ms ease-out;
}

.navbar .nav-link:hover {
  text-decoration-color: var(--rule-strong);
}

.navbar .nav-link.active {
  text-decoration-color: var(--accent);
}

.navbar .navbar-toggler {
  border: 0;
}

.navbar .navbar-toggler-icon {
  filter: var(--toggler-filter);
}

/* Theme toggle, injected into .quarto-navbar-tools by _includes/theme-toggle.html */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.5rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: color 120ms ease-out;
}

.theme-toggle:hover {
  color: var(--accent);
}

.theme-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Show the icon for the theme you would switch to */
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

.nav-footer {
  background-color: var(--paper);  /* Quarto hard-codes #fff here */
  border-top: 1px solid var(--rule);
  color: var(--ink-3);
}

.nav-footer .nav-footer-left,
.nav-footer .nav-footer-center,
.nav-footer .nav-footer-right,
.nav-footer p {
  font-size: 0.8125rem;
  color: var(--ink-3);
}

.nav-footer a {
  color: inherit;
  text-underline-offset: 0.18em;
}

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

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
