/* ── Farbpalette ─────────────────────────────────────────────
   Alle Farben hier zentral – einfach Werte ändern zum Anpassen. */

:root {
  --bg:          #1d1f26;   /* Hintergrund, weicher als reines Schwarz */
  --text:        #c9c6bd;   /* gedämpftes Warmweiß, blendet weniger    */
  --accent:      #9cb37f;   /* Grün für Überschriften / Akzente        */
  --accent-dim:  #7d9263;   /* dunkleres Grün für Linien / Hover       */
  --link:        #a7be88;   /* Linktext                                */
  --muted:       #8c897f;   /* gedämpfter Text (Bibdaten, Notizen)     */
}

/* ── Base ────────────────────────────────────────────────── */

html { font-size: medium; }

body {
  max-width: 50rem;          /* einheitliche, lesbare Spaltenbreite */
  margin: 0 auto;            /* zentriert -> gleicher Rand li/re    */
  padding: 2rem 2rem 5rem;
  font-family: Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  counter-reset: sidenote-counter;
}

/* Alle Block-Elemente füllen die Spalte = einheitliche Breite */
p, footer, table, .pubhead, .bibdata, .abstract, .relpub {
  width: 100%;
  box-sizing: border-box;
}

/* ── Headings ────────────────────────────────────────────── */

h1 {
  color: var(--accent);
  font-family: sans-serif;
  font-weight: 400;
  margin-top: 3.5rem;
  margin-bottom: 1.5rem;
  font-size: 3rem;
  line-height: 1.1;
}

h2 {
  color: var(--accent);
  font-style: italic;
  font-weight: 400;
  margin-top: 2.1rem;
  margin-bottom: 0;
  font-size: 2rem;
  line-height: 1.1;
}

h3 {
  font-style: italic;
  font-weight: 400;
  font-size: 1.6rem;
  margin-top: 2rem;
  margin-bottom: 0;
  line-height: 1.1;
}

h4 {
  font-style: italic;
  font-weight: 400;
  font-size: 1.35rem;
  margin-top: 2rem;
  margin-bottom: 0;
  line-height: 1.1;
}

em { color: var(--accent); font-style: italic; }

/* ── Layout ──────────────────────────────────────────────── */

article { padding: 0.5rem 0; position: relative; }
section { padding: 1rem 0; }

p {
  font-size: 1.1rem;
  line-height: 1.75;
  margin: 1.2rem 0;
}

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

/* ── Links ───────────────────────────────────────────────── */

a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-dim);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}

a:hover {
  color: #fff;
  border-bottom-color: var(--link);
}

a em { color: var(--link); }
a:hover em { color: #fff; }

/* ── Navigation ──────────────────────────────────────────── */

nav {
  margin: 1rem 0 2rem;
  border-bottom: 1px solid var(--accent-dim);
  padding-bottom: 0.5rem;
}

nav a {
  display: inline-block;
  margin: 0 1.2rem 0 0;
  color: var(--accent);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 400;
  font-size: 1rem;
  border-bottom: none;
  padding: 0.3rem 0;
}

nav a:hover,
nav a:focus { color: #fff; }

/* ── Tables ──────────────────────────────────────────────── */

table {
  text-align: left;
  font-size: 1.05rem;
  line-height: 1.4;
  margin: 1.4rem 0;
  border-top: 1px solid var(--accent-dim);
  border-bottom: 1px solid var(--accent-dim);
  border-collapse: separate;
  border-spacing: 0 5px;
  font-feature-settings: 'tnum';
}

/* ── Publikationsliste ───────────────────────────────────── */

.pubhead {
  text-align: left;
  font-style: italic;
  font-weight: 400;
  font-size: 1.5rem;
  padding-top: 1rem;
  line-height: 1.2;
  color: var(--accent);
}

.pubimg { padding: 0; }

.pubimg img {
  max-height: 10rem;
  background-color: #fffff6;   /* heller Rahmen für Plot-Thumbnails */
  padding: 2px;
}

.bibdata {
  padding: 0.5rem 0;
  vertical-align: middle;
  font-size: 0.9rem;
  text-align: left;
  color: var(--muted);
}

.abstract {
  font-size: 0.85rem;
  text-indent: 0;
  text-align: justify;
  color: var(--muted);
}

.relpub {
  font-size: 0.85rem;
  line-height: 1.6;
  text-align: left;
  color: var(--muted);
}

/* ── Teaching-Tabelle ────────────────────────────────────── */

.semester {
  vertical-align: middle;
  font-size: 0.75rem;
  font-variant: small-caps;
  text-align: left;
  color: var(--muted);
}

td.semester { padding-right: 1rem; }

/* ── Margin- / Sidenotes ─────────────────────────────────── */

.sidenote,
.marginnote {
  float: right;
  clear: right;
  width: 42%;
  margin: 0.3rem 0 1rem 1.5rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--muted);
}

/* Bild auf eigene Zeile -> Caption rutscht immer darunter.
   Nur direkte <img>-Kinder, damit die zwei GIFs in <box> nebeneinander bleiben. */
.sidenote > img,
.marginnote > img {
  display: block;
  max-width: 100%;
  margin-bottom: 0.4rem;
}

.sidenote-number { counter-increment: sidenote-counter; }

.sidenote-number:after,
.sidenote:before {
  color: var(--accent);
  font-size: 0.8rem;
  position: relative;
  top: -0.4rem;
}

.sidenote:before { content: counter(sidenote-counter) " "; }

/* ── Responsive ──────────────────────────────────────────── */

@media screen and (max-width: 760px) {
  body { padding: 1.5rem 1.2rem 3rem; }
  nav a { margin-right: 0.8rem; }
  .sidenote, .marginnote {
    float: none;
    width: auto;
    margin: 1rem 0;
  }
}
