/*
 * agag-horn.math.rptu.de
 *
 * Follows the look of math.rptu.de -- Red Hat Display/Text, black on a light
 * grey page, white panels, breadcrumb over a black rule -- without loading
 * anything from there.
 */

@font-face {
  font-family: "Red Hat Text";
  src: url("fonts/RedHatText.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Red Hat Text";
  src: url("fonts/RedHatText-Italic.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Red Hat Display";
  src: url("fonts/RedHatDisplay.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --page: #f5f5f7;        /* math.rptu.de body */
  --panel: #ffffff;
  --ink: #000000;
  --ink-soft: #3c3c40;
  --muted: #66666c;
  --rule: #000000;
  --hair: #d6d6db;
  --accent: #26d07c;      /* RPTU green */
  --focus: #006b6b;       /* RPTU teal */

  --text: "Red Hat Text", system-ui, sans-serif;
  --display: "Red Hat Display", "Red Hat Text", system-ui, sans-serif;

  --wrap: 72rem;
  --measure: 40rem;
  --gutter: clamp(1rem, 4vw, 2.25rem);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #141416;
    --panel: #1d1d20;
    --ink: #f3f3f5;
    --ink-soft: #d2d2d7;
    --muted: #a0a0a8;
    --rule: #f3f3f5;
    --hair: #3a3a40;
    --focus: #5fe0a6;
  }
}

/* ---------------------------------------------------------------- base */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 1rem/1.5 var(--text);
  font-kerning: normal;
}

h1, h2, h3 {
  font-family: var(--display);
  line-height: 1.2;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.4rem); font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 1.45rem; font-weight: 650; }
h3 { font-size: 1.05rem; font-weight: 700; font-family: var(--text); }

p, ul, ol { margin: 0 0 1em; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}
a:hover { text-decoration-color: var(--accent); text-decoration-thickness: 3px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

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

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: .5rem;
  top: -3rem;
  padding: .5rem .75rem;
  background: var(--ink);
  color: var(--page);
}
.skip:focus { top: .5rem; }

/* ------------------------------------------------------------ masthead */

.masthead-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-top: 1.75rem;
}

.brand { display: flex; flex-direction: column; gap: .55rem; }

.brand-name {
  font: 800 2rem/1 var(--display);
  letter-spacing: -.02em;
  text-decoration: none;
}
.brand-group {
  font-size: .8125rem;
  font-weight: 700;
  text-decoration: none;
}
.brand-group:hover { text-decoration: underline; }

.primary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1.75rem;
  padding-top: .35rem;
}
.primary ul {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.primary a {
  font-weight: 500;
  text-decoration: none;
  padding-bottom: .2rem;
  border-bottom: 3px solid transparent;
}
.primary a:hover { border-bottom-color: var(--accent); }
.primary a[aria-current="page"] { font-weight: 700; border-bottom-color: var(--ink); }

.lang {
  font-size: .875rem;
  text-decoration: none;
  padding: .2rem .55rem;
  border: 1px solid var(--ink);
  border-radius: 2px;
}
.lang:hover { background: var(--ink); color: var(--page); }

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 0;
  margin: 2.25rem 0 0;
  padding: 0 0 1rem;
  list-style: none;
  font-size: .875rem;
  border-bottom: 1px solid var(--rule);
}
.breadcrumb li + li::before {
  content: "";
  display: inline-block;
  width: .45em;
  height: .45em;
  margin: 0 .85em .1em .7em;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current] { font-weight: 700; }

/* ---------------------------------------------------------------- main */

main { padding-block: 3rem 4rem; }

.page-head {
  max-width: var(--measure);
  margin-bottom: 2.5rem;
}
.page-head p { color: var(--ink-soft); font-size: 1.0625rem; }

.panel {
  container-type: inline-size;
  background: var(--panel);
  padding: clamp(1.25rem, 3vw, 2.25rem);
  margin-bottom: 1.5rem;
}
.panel > :last-child { margin-bottom: 0; }

.panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.panels .panel { margin: 0; }
.panels .panel.wide { grid-column: 1 / -1; }

@media (max-width: 48rem) {
  .panels { grid-template-columns: 1fr; }
}

.prose { max-width: var(--measure); }

/* RPTU marks link lists with a guillemet. */
.links { list-style: none; padding: 0; }
.links li { padding-left: 1.2em; text-indent: -1.2em; margin-bottom: .35em; }
.links li::before { content: "»"; font-weight: 700; display: inline-block; width: 1.2em; text-indent: 0; }

.meta { color: var(--muted); font-size: .9375rem; }

/* -------------------------------------------------------------- profile */

.profile {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem 3rem;
  align-items: start;
  margin-bottom: 3rem;
}
.profile h1 {
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--hair);
}
.profile-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1.5rem 2rem;
}
.profile-facts h2 { font: 700 1rem/1.5 var(--text); margin-bottom: .75rem; }
.profile-facts p { margin-bottom: .75rem; }
.profile-photo { width: 14rem; aspect-ratio: 1; object-fit: cover; }

@media (max-width: 40rem) {
  .profile { grid-template-columns: 1fr; }
  .profile-photo { order: -1; width: 8rem; }
}

/* ------------------------------------------------------- career (dl) */

.career { display: grid; grid-template-columns: 7.5rem 1fr; gap: .45rem 1rem; margin: 0; }
.career dt { font-variant-numeric: tabular-nums; color: var(--muted); }
.career dd { margin: 0; }

/* --------------------------------------------------------- publications */

.pubs { padding-left: 1.75rem; margin: 0; }
.pubs li { margin-bottom: 1.15rem; padding-left: .35rem; }
.pubs li::marker { font-family: var(--display); font-weight: 600; color: var(--muted); }
.paper-authors { color: var(--ink-soft); font-size: .9375rem; }
.paper-title { font-weight: 600; }
.paper-status { font-size: .9375rem; }
.paper-journal { font-style: italic; }
.paper-extras { font-size: .875rem; margin-top: .15rem; }

/* ------------------------------------------------------------- projects */

.projects { list-style: none; padding: 0; margin: 0; }
.projects li { padding: .6rem 0; border-top: 1px solid var(--hair); }
.projects li:first-child { border-top: 0; padding-top: 0; }
.project-title { font-weight: 600; }
.project-people { color: var(--ink-soft); font-size: .9375rem; }
.project-funder { font-size: .9375rem; }

/* -------------------------------------------------------------- courses */

.courses { list-style: none; padding: 0; margin: 0; }
.courses li {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: .25rem 1rem;
  padding: .6rem 0;
  border-top: 1px solid var(--hair);
}
.courses li:first-child { border-top: 0; }
.course-term { color: var(--muted); font-variant-numeric: tabular-nums; }
.course-title { font-weight: 600; }
.course-kind { color: var(--muted); }
.course-kind::before { content: " – "; }
.course-links { display: block; font-size: .9375rem; }

@container (max-width: 30rem) {
  .courses li { grid-template-columns: 1fr; gap: 0; }
}
@container (max-width: 24rem) {
  .career { grid-template-columns: 1fr; gap: 0; }
  .career dd { margin-bottom: .6rem; }
}

/* ---------------------------------------------------------------- footer */

.colophon {
  padding-bottom: 3rem;
  font-size: .9375rem;
}
.colophon-grid {
  border-top: 1px solid var(--rule);
  padding-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 2rem;
}
.colophon h2 { font: 700 .9375rem/1.5 var(--text); margin-bottom: .5rem; }
.colophon ul { list-style: none; padding: 0; margin: 0; }
.colophon li { margin-bottom: .25rem; }
.colophon p { margin: 0; }

/* --------------------------------------------------- old course pages */

.legacy h1 { font-size: 1.8rem; }
.legacy table { border-collapse: collapse; }
.legacy td, .legacy th { padding: .25rem .75rem .25rem 0; vertical-align: top; text-align: left; }

.course-place { margin-top: 2rem; padding-bottom: .4rem; border-bottom: 1px solid var(--rule); }
.course-place:first-of-type { margin-top: 1.25rem; }

.thesis-title { display: block; font-style: italic; }

.linklist { margin: 0; }
.linklist dt { font-weight: 600; }
.linklist dd { margin: .15rem 0 1.1rem; color: var(--ink-soft); }
.linklist dd:last-child { margin-bottom: 0; }
