/* Jürgen Reingruber – personal website. No external dependencies. */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1f2328;
  --muted: #5b636d;
  --line: #e4e1da;
  --accent: #8a1c2b;      /* deep maroon, echoing the old headings */
  --accent-soft: #f6ecec;
  --link: #1d4f91;
  --maxw: 960px;
  --radius: 10px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --surface: #1d2024;
    --text: #e6e6e3;
    --muted: #a0a6ad;
    --line: #2f3338;
    --accent: #e08a95;
    --accent-soft: #2a1f22;
    --link: #8db8f0;
  }
  figure img { background: #fff; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
}
h1, h2, h3, .brand, .nav, .pub-title, .lnum, .llinks, .pdf, summary, .label, .site-footer, .toc {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-height: 60px; }
.brand { font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; letter-spacing: .01em; }
.nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: .95rem; }
.nav a { display: block; padding: 6px 12px; border-radius: 6px; color: var(--muted); text-decoration: none; }
.nav a:hover { background: var(--accent-soft); color: var(--accent); }
.nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }

main { padding-top: 36px; padding-bottom: 56px; }
h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 20px; }
h2 { font-size: 1.45rem; line-height: 1.3; margin: 44px 0 14px; color: var(--accent); }
h3 { font-size: 1.12rem; line-height: 1.35; margin: 30px 0 10px; }
p { margin: 0 0 14px; }
section::after { content: ""; display: table; clear: both; }
.lead { color: var(--muted); font-size: 1.05rem; }
.note { color: var(--muted); font-size: .92rem; }

/* Home */
.hero { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; padding: 8px 0 8px; }
.hero h1 { margin-bottom: 4px; }
.portrait { width: 200px; height: 200px; object-fit: cover; border-radius: 50%; border: 4px solid var(--surface); box-shadow: 0 2px 12px rgba(0,0,0,.12); }
.role { font-size: 1.15rem; color: var(--accent); margin-bottom: 10px; font-family: system-ui, sans-serif; }
.affil { color: var(--muted); margin-bottom: 8px; }
.logos { display: flex; gap: 18px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.logos img { height: 40px; width: auto; background: #fff; padding: 4px; border-radius: 4px; }
.at { color: var(--muted); }

.cards { display: grid; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; }
.card h3 { margin-top: 0; color: var(--accent); }
.card p:last-child { margin-bottom: 0; }

.callout { background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 6px 24px 14px; margin-top: 44px; }
.callout h2 { margin-top: 16px; }
ul.links { padding-left: 20px; margin: 0; }
ul.links li { margin: 4px 0; }

/* Research */
.toc { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.toc a { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; background: var(--surface); font-size: .95rem; }
section + section { border-top: 1px solid var(--line); margin-top: 48px; }
figure { margin: 4px 0 18px; font-size: .86rem; line-height: 1.45; color: var(--muted); }
figure img { display: block; border-radius: 6px; }
figcaption { margin-top: 8px; font-family: system-ui, sans-serif; }
.fig-right { float: right; margin-left: 24px; max-width: 240px; }
.fig-wide { max-width: 560px; margin-left: auto; margin-right: auto; clear: both; }
.grid .imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid .imgs img { width: 100%; }
.refs-title { color: var(--muted); clear: both; }
ol.refs { font-size: .9rem; color: var(--muted); padding-left: 26px; }
ol.refs li { margin-bottom: 4px; }

/* Publications */
h2.year { font-size: 1.1rem; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-top: 32px; }
ol.pubs { list-style: none; padding: 0; margin: 0; }
.pub { padding: 14px 0; border-bottom: 1px dashed var(--line); }
.pub:last-child { border-bottom: 0; }
.pub-title { font-weight: 600; line-height: 1.35; margin-bottom: 4px; }
.pub-authors { font-size: .95rem; }
.pub-authors strong { color: var(--accent); }
.pub-venue { font-style: italic; color: var(--muted); font-size: .95rem; }
.pub details, .pub .pdf { display: inline-block; margin-top: 6px; font-size: .88rem; vertical-align: top; }
.pub details { margin-right: 12px; }
.pub details[open] { display: block; }
summary { cursor: pointer; color: var(--link); }
summary:hover { color: var(--accent); }
.pub details p { font-size: .95rem; text-align: justify; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; margin: 8px 0; }
.pdf { text-decoration: none; border: 1px solid var(--line); border-radius: 4px; padding: 0 8px; background: var(--surface); }

/* Teaching */
ol.lectures { list-style: none; padding: 0; margin: 20px 0 0; }
.lecture { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.lnum { font-weight: 700; color: var(--accent); font-size: .9rem; }
.ltitle { font-weight: 600; line-height: 1.35; }
.lwho { color: var(--muted); font-size: .92rem; }
.llinks { display: flex; gap: 8px; white-space: nowrap; font-size: .88rem; }
.llinks a { text-decoration: none; border: 1px solid var(--line); border-radius: 4px; padding: 2px 8px; background: var(--surface); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.contact-grid h2 { margin-top: 0; font-size: 1.2rem; }
.label { display: inline-block; min-width: 56px; color: var(--muted); font-size: .85rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .85rem; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 18px; padding-bottom: 18px; }
.footer-links { display: flex; gap: 16px; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  h1 { font-size: 1.6rem; }
  .fig-right { float: none; margin: 4px auto 18px; }
  .lecture { grid-template-columns: 1fr; gap: 4px; }
  .portrait { width: 150px; height: 150px; }
  .header-inner { padding-top: 8px; padding-bottom: 8px; }
}
