/* ---------------------------------------------------------------
   jeroen.science — single stylesheet
   Light/dark palettes via CSS variables; dark follows the system.
   --------------------------------------------------------------- */

:root {
  --bg: #fdfdfb;
  --bg-card: #ffffff;
  --text: #1f2328;
  --text-muted: #59626d;
  --accent: #0e6e8c;
  --accent-hover: #0a5269;
  --rule: #e4e6e8;
  --figure-bg: #ffffff;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171a;
    --bg-card: #1c2024;
    --text: #e8eaec;
    --text-muted: #9aa4ae;
    --accent: #5bb8d4;
    --accent-hover: #85cde2;
    --rule: #2c3236;
    --figure-bg: #f4f4f2; /* keep figures on light ground for legibility */
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---- header / nav ---- */

header {
  border-bottom: 1px solid var(--rule);
}

.nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.nav .brand {
  font-weight: 650;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav ul {
  display: flex;
  gap: 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.98rem;
}

.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] { color: var(--text); font-weight: 600; }

/* ---- general typography ---- */

main { padding: 2.5rem 0 3rem; }

h1 {
  font-size: 1.85rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.4rem;
  margin: 3rem 0 1.5rem;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: 0 0 0.6rem;
}

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

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

p { margin: 0 0 1rem; }

ul { padding-left: 1.3rem; }
li { margin-bottom: 0.35rem; }

/* ---- about page ---- */

.hero {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.hero-text { flex: 1 1 22rem; }

.hero img {
  width: 13rem;
  max-width: 100%;
  border-radius: 12px;
  flex: 0 0 auto;
}

/* Narrow screens: photo above the greeting, modestly sized */
@media (max-width: 640px) {
  .hero img {
    order: -1;
    width: 9.5rem;
    margin: 1rem auto 0;
  }
}

.tagline {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 1.4rem;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.6rem;
  padding: 0;
  list-style: none;
}

.links a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 0.92rem;
  color: var(--text);
  background: var(--bg-card);
}

.links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.links svg { width: 1rem; height: 1rem; fill: currentColor; }

/* ---- research page ---- */

.project {
  margin-bottom: 3.2rem;
}

.project .meta {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
}

.project figure {
  margin: 1.2rem 0;
  background: var(--figure-bg);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 0.9rem;
}

.project figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.project figcaption {
  font-size: 0.88rem;
  color: #59626d;
  margin-top: 0.6rem;
  line-height: 1.45;
}

.paper-links a {
  font-weight: 550;
}

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

footer {
  border-top: 1px solid var(--rule);
  padding: 1.4rem 0 2.2rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
