/* ==========================================================
   Style of the website of Rémi Bonnin
   To change the main colour, edit --accent below.
   ========================================================== */

:root {
  --bg: #ffffff;
  --text: #1f2933;
  --muted: #5f6b7a;
  --accent: #1d4e6f;       /* dark blue, same as the CV */
  --accent-soft: #e8f0f6;
  --rule: #dde3ea;
  --max-width: 780px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181d;
    --text: #e4e8ec;
    --muted: #9aa5b1;
    --accent: #8cc4e8;
    --accent-soft: #1d2a35;
    --rule: #2c343d;
  }
}

* { box-sizing: border-box; }

html { font-size: 17px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.6;
}

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

/* ---------- Header and menu ---------- */

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

.site-header .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.6rem 16px 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
}

.site-name {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
}
.site-name:hover { text-decoration: none; }

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.3rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
}

nav a { color: var(--muted); padding-bottom: 2px; }
nav a:hover { color: var(--accent); text-decoration: none; }
nav a.current {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}

/* ---------- Main content ---------- */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 16px 3rem;
}

h1, h2, h3 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--accent);
  line-height: 1.25;
}

h1 { font-size: 1.7rem; margin: 0 0 1rem; }

h2 {
  font-size: 1.25rem;
  margin: 2.4rem 0 0.9rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--rule);
}

h3 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 1.6rem 0 0.6rem;
}

/* ---------- Home page: photo + introduction ---------- */

.intro {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.intro img {
  width: 170px;
  height: auto;
  border-radius: 6px;
  flex-shrink: 0;
}

.subtitle {
  color: var(--muted);
  margin-top: -0.6rem;
  font-style: italic;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.4rem;
}

.button {
  display: inline-block;
  padding: 0.4rem 0.95rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
}
.button:hover { background: var(--accent-soft); text-decoration: none; }

/* ---------- Lists of papers, talks, teaching ---------- */

ol.papers, ul.entries {
  padding-left: 0;
  list-style: none;
  margin: 0;
}

ol.papers li, ul.entries li {
  margin-bottom: 1rem;
}

.title { font-weight: bold; }
.authors { color: var(--text); }
.meta { color: var(--muted); font-size: 0.95rem; }

.entries .date {
  display: inline-block;
  min-width: 6.5rem;
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
}

/* ---------- Contact page ---------- */

.addresses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.addresses div {
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 1rem 1.2rem;
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 1.2rem 16px 2rem;
}

/* ---------- Phones ---------- */

@media (max-width: 600px) {
  html { font-size: 16px; }
  .intro { flex-direction: column; }
  .intro img { width: 140px; }
  .entries .date { display: block; }
}
