/* ─────────────────────────────────────────────
   markus.flicke.eu — shared styles
   Minimal academic layout, inspired by
   m-niemeyer.github.io
   ───────────────────────────────────────────── */

:root {
  --max-width: 820px;
  --text: #1a1a1a;
  --muted: #6b7280;
  --link: #2563eb;
  --link-hover: #1d4ed8;
  --border: #e5e7eb;
  --bg: #ffffff;
  --card-bg: #fafafa;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
    sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 96px 24px;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* ── Header / profile ─────────────────────── */
.profile {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 8px;
}

.profile-text {
  flex: 1 1 auto;
}

.profile-text h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 6px 0;
  letter-spacing: -0.02em;
}

.profile-text .role {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0;
}

.profile-photo {
  flex: 0 0 auto;
}

.profile-photo img {
  width: 150px;
  height: auto;
  object-fit: cover;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 4px;
}

/* ── Link bar ─────────────────────────────── */
.linkbar {
  margin: 20px 0 8px 0;
  font-size: 0.98rem;
}

.linkbar a {
  margin-right: 6px;
  white-space: nowrap;
}

.linkbar .icon {
  width: 1em;
  height: 1em;
  fill: currentColor;
  vertical-align: -0.13em;
  margin-right: 0.35em;
}

.linkbar .sep {
  color: var(--border);
  margin-right: 6px;
}

/* ── Bio ──────────────────────────────────── */
.bio {
  margin: 22px 0 8px 0;
}

.bio p {
  margin: 0 0 12px 0;
}

/* ── Sections ─────────────────────────────── */
section {
  margin-top: 44px;
}

h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 4px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--text);
  display: inline-block;
}

.section-body {
  margin-top: 20px;
}

/* ── News ─────────────────────────────────── */
.news-item {
  display: flex;
  gap: 18px;
  margin-bottom: 12px;
}

.news-date {
  flex: 0 0 92px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.news-body {
  flex: 1 1 auto;
}

/* ── Publications ─────────────────────────── */
.pub {
  display: flex;
  gap: 22px;
  margin-bottom: 32px;
  align-items: flex-start;
}

.pub-thumb {
  flex: 0 0 190px;
}

.pub-thumb img {
  width: 190px;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.pub-info {
  flex: 1 1 auto;
}

.pub-venue {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pub-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin: 2px 0 4px 0;
}

.pub-authors {
  color: #374151;
  font-size: 0.98rem;
  margin-bottom: 6px;
}

.pub-authors .me {
  font-weight: 700;
  color: var(--text);
}

.pub-links a {
  font-size: 0.92rem;
  margin-right: 12px;
}

/* ── Timeline (work / education / awards) ── */
.entry {
  display: flex;
  gap: 18px;
  margin-bottom: 22px;
}

.entry-date {
  flex: 0 0 130px;
  color: var(--muted);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.entry-body {
  flex: 1 1 auto;
}

.entry-title {
  font-weight: 700;
}

.entry-sub {
  color: var(--muted);
  font-style: italic;
}

/* ── Affiliations ─────────────────────────── */
.affiliations {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 36px;
  margin-top: 22px;
}

.affiliations a {
  display: inline-flex;
  align-items: center;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: filter 0.2s, opacity 0.2s;
}

.affiliations a:hover {
  filter: grayscale(0%);
  opacity: 1;
}

.affiliations img {
  max-height: 46px;
  max-width: 120px;
  width: auto;
  object-fit: contain;
}

/* ── Footer ───────────────────────────────── */
footer {
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

/* ── Books page ───────────────────────────── */
.back-link {
  display: inline-block;
  margin-bottom: 28px;
  font-size: 0.95rem;
}

.book {
  margin-bottom: 40px;
  overflow: hidden;
}

.book h3 {
  font-size: 1.3rem;
  margin: 0 0 12px 0;
}

.book-cover {
  float: right;
  margin: 4px 0 16px 24px;
  max-width: 150px;
  height: auto;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.book-figure {
  display: block;
  margin: 20px auto;
  max-width: 80%;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.book hr,
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* ── Responsive ───────────────────────────── */
@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .profile {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 18px;
  }

  .pub {
    flex-direction: column;
    gap: 12px;
  }

  .pub-thumb,
  .pub-thumb img {
    width: 100%;
    max-width: 320px;
  }

  .news-item,
  .entry {
    flex-direction: column;
    gap: 2px;
  }

  .book-cover {
    max-width: 110px;
    margin-left: 16px;
  }
}
