/* ==========================================================
   Loïc Desgeorges – personal page
   Classic academic style: white page, serif text, navy links
   ========================================================== */

:root {
  --text: #1f2933;
  --muted: #5f6b7a;
  --link: #1a4b8c;
  --link-hover: #0e2f5c;
  --rule: #d9dee4;
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --width: 50rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

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

.wrap {
  max-width: var(--width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Links ---------- */
a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--link-hover);
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 3px solid #8fb4e8;
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Top navigation ---------- */
.site-nav {
  border-bottom: 1px solid var(--rule);
  background: var(--bg-soft);
  font-size: 0.9rem;
}

.site-nav .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.site-nav .site-title {
  font-weight: bold;
  color: var(--text);
  text-decoration: none;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav ul a {
  text-decoration: none;
  color: var(--muted);
  padding-bottom: 0.1rem;
  border-bottom: 2px solid transparent;
}

.site-nav ul a:hover,
.site-nav ul a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--link);
}

/* ---------- Introduction ---------- */
.intro {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  padding: 2rem 0 1.75rem;
}

.intro img {
  flex: none;
  width: 9rem;
  height: 9rem;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--rule);
}

h1 {
  margin: 0 0 0.2rem;
  font-size: 1.9rem;
  line-height: 1.2;
  font-weight: normal;
  letter-spacing: -0.01em;
}

.role {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.intro p {
  margin: 0 0 0.9rem;
}

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

.links a {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--link);
  border-radius: 3px;
  text-decoration: none;
  font-size: 0.85rem;
}

.links a:hover {
  background: var(--link);
  color: #fff;
}

/* ---------- Sections ---------- */
main section {
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
}

h2 {
  margin: 0 0 0.6rem;
  font-size: 1.2rem;
  line-height: 1.3;
  font-weight: bold;
}

main p {
  margin: 0 0 0.8rem;
}

main ul.themes {
  margin: 0 0 0.9rem;
  padding-left: 1.25rem;
}

main ul.themes li {
  margin-bottom: 0.5rem;
}

.more {
  margin-top: 0.25rem;
}

/* ---------- Publications ---------- */
ol.publications {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

ol.publications li {
  margin-bottom: 0.85rem;
  padding-left: 0.25rem;
}

ol.publications .title {
  display: block;
  font-style: italic;
}

ol.publications .authors {
  display: block;
}

ol.publications .venue {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

ol.publications .award {
  display: block;
  margin-top: 0.1rem;
  font-style: italic;
  font-size: 0.85rem;
  color: #8a3b12;
}

/* ---------- Footer / contact ---------- */
footer {
  margin-top: 1rem;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--rule);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

footer .wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.25rem 2rem;
}

footer h2 {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
  color: var(--text);
}

footer address {
  font-style: normal;
}

/* ---------- Small screens ---------- */
@media (max-width: 40rem) {
  body {
    font-size: 0.92rem;
  }

  .intro {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    padding-top: 1.5rem;
  }

  .intro img {
    width: 7.5rem;
    height: 7.5rem;
  }

  h1 {
    font-size: 1.6rem;
  }
}

/* ---------- Print ---------- */
@media print {
  .site-nav,
  .links {
    display: none;
  }

  footer {
    background: none;
  }
}

/* ---------- Teaching pages ---------- */
.page-title {
  padding: 2rem 0 1.5rem;
}

.page-title h1 {
  margin-bottom: 0.5rem;
}

.page-title p {
  margin: 0;
  color: var(--muted);
}

.page-title .breadcrumb {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
}

/* Course table */
table.courses {
  width: 100%;
  border-collapse: collapse;
}

table.courses thead th {
  padding: 0.6rem 0.9rem;
  text-align: left;
  font-size: 0.85rem;
  color: var(--muted);
  border-bottom: 2px solid var(--rule);
}

table.courses tbody {
  border-bottom: 1px solid var(--rule);
}

table.courses tbody th,
table.courses tbody td {
  padding: 1.1rem 0.9rem;
  vertical-align: top;
  text-align: left;
  line-height: 1.5;
}

table.courses tbody tr + tr td {
  border-top: 1px solid #eceff3;
}

table.courses tbody th {
  width: 11rem;
  font-weight: bold;
}

table.courses .sub {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Material lists on course pages */
ul.materials {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
}

ul.materials li {
  margin-bottom: 0.2rem;
}

@media (max-width: 40rem) {
  table.courses tbody th {
    width: 7rem;
  }
}
