/* =============================================================
   Thomas Wolfers – the only stylesheet for the site.
   Same look as the lab website (mhm-lab.github.io).
   Colours are defined once here; change them in one place.
   ============================================================= */

:root {
  --green: #4f7a37;        /* buttons, roles, accents */
  --green-light: #74a155;  /* hover borders */
  --ink: #1d1d1f;          /* headings */
  --text: #3d4144;         /* body text */
  --muted: #6e7378;        /* secondary text */
  --line: #e6e8ea;         /* dividers */
  --bg: #ffffff;
  --link: #2f6f9f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

img { max-width: 100%; height: auto; }
a { color: var(--link); }
a:hover { color: var(--green); }
h1, h2, h3 { color: var(--ink); line-height: 1.2; text-wrap: balance; }
h1 { font-size: 2.1rem; margin: 0 0 0.6em; letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; margin: 2em 0 0.5em; }
h3 { font-size: 1.1rem; margin: 1.5em 0 0.4em; }

/* ---------- header ---------- */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem max(16px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line);
}
.site-logo {
  color: var(--ink);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
}
.site-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--green); }
.site-nav .lang { padding-left: 1.25rem; border-left: 1px solid var(--line); }

/* ---------- main content ---------- */
.content {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem max(16px, env(safe-area-inset-left)) 4rem;
}

/* ---------- footer ---------- */
.site-footer {
  padding: 1.5rem 16px 2rem;
  border-top: 1px solid var(--line);
  background: #f6f7f8;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}
.site-footer p { margin: 0.3rem 0; }
.site-footer a { color: var(--muted); }

/* ---------- homepage ---------- */
.intro { display: flex; align-items: center; margin-top: 0.5rem; gap: 1.75rem; margin-bottom: 1.5rem; }
.intro img { flex: 0 0 170px; width: 170px; height: 170px; border-radius: 50%; }
.intro .lead { margin: 0; color: var(--ink); }
.intro .path { margin: 0.75rem 0 0; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
@media (max-width: 600px) { .intro { flex-direction: column; align-items: flex-start; gap: 1rem; } }

.lead { font-size: 1.2rem; line-height: 1.55; }
.buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0 3rem; }
.button {
  padding: 0.65em 1.4em;
  border: 1px solid var(--green);
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}
.button:hover { background: #3f6229; color: #fff; }
.button.secondary { background: transparent; color: var(--green); }
.button.secondary:hover { background: var(--green); color: #fff; }

.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.topics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1.25rem 0 1.5rem; }
.topic { padding: 1rem 1.1rem; border-radius: 10px; background: #f1f6ee; }
.topic strong { display: block; color: var(--ink); line-height: 1.3; }
.topic span { display: block; margin-top: 0.3rem; color: var(--muted); font-size: 0.85rem; line-height: 1.4; }
@media (max-width: 600px) { .topics { grid-template-columns: 1fr; } }
.card { color: var(--text); text-decoration: none; }
.card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; margin-bottom: 0.6rem; }
.card strong { display: block; color: var(--ink); }
.card span { display: block; color: var(--muted); font-size: 0.85rem; line-height: 1.4; }
.card:hover strong { color: var(--green); }
@media (max-width: 700px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.note { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }

/* ---------- science page ---------- */
.themes { margin-top: 2rem; }
.theme { display: flex; gap: 1.25rem; align-items: center; padding: 1.25rem 0; border-top: 1px solid var(--line); }
.theme img { flex: 0 0 110px; width: 110px; height: 110px; object-fit: cover; border-radius: 10px; }
.theme h2 { margin: 0 0 0.3rem; font-size: 1.15rem; }
.theme p { margin: 0; }

/* ---------- small helpers ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.highlight {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--green-light);
  border-radius: 6px;
  background: #f1f6ee;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 600;
}
.meta { margin-top: -0.3rem; color: var(--green); font-size: 0.85rem; font-weight: 700; }
