/* ==========================================================================
   Marc Garnier — personal academic site
   Minimal light layout: white page, Times New Roman throughout, hairline dividers,
   entries laid out as "date on the left, text on the right".
   ========================================================================== */

:root {
  --bg: #ffffff;
  --text: #212829;
  --text-muted: #5d6b6e;
  --text-faint: #6c787a;
  --text-body: #343d3f;
  --rule: #e6eaea;

  --serif: "Times New Roman", Times, "Liberation Serif", Tinos, "Nimbus Roman", serif;

  --page: 1040px;   /* header width */
  --column: 800px;  /* content width */
  --aside: 148px;   /* date column */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

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

.nav {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: var(--serif);
  font-size: 1rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.nav-links { list-style: none; display: flex; gap: 1.75rem; }

.nav-links a {
  font-family: var(--serif);
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease;
}

.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); border-bottom-color: currentColor; }

/* --------------------------------------------------------------------------
   Page
   -------------------------------------------------------------------------- */

main {
  max-width: var(--column);
  margin: 0 auto;
  padding: 5rem 2rem 4rem;
}

.page-head { padding-bottom: 2.5rem; border-bottom: 1px solid var(--rule); }

h1 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.intro {
  margin-top: 1.25rem;
  max-width: 40rem;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.75;
}

.intro + .intro { margin-top: 0.9rem; }

h2.section-label {
  margin-top: 4rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* --------------------------------------------------------------------------
   Entries: date on the left, content on the right
   -------------------------------------------------------------------------- */

.entries { list-style: none; }

.entry {
  display: grid;
  grid-template-columns: var(--aside) 1fr;
  column-gap: 0;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--rule);
}

.entries.compact .entry { padding: 1.5rem 0; }

.entry .when {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-top: 0.3rem;
}

.entry h3 {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.entries.compact .entry h3 { font-size: 1.05rem; }

.entry .meta {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.entry p.desc {
  margin-top: 0.8rem;
  color: var(--text-body);
}

.entry p.desc + p.desc { margin-top: 0.7rem; }

.entry .source {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-faint);
}

.links { display: flex; flex-wrap: wrap; gap: 1.75rem; margin-top: 1.25rem; }

.links a {
  font-size: 0.85rem;
  font-weight: 600;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--rule);
  transition: border-color 0.15s ease;
}

.links a:hover { border-bottom-color: var(--text); }

/* --------------------------------------------------------------------------
   Long-form page (thesis)
   -------------------------------------------------------------------------- */

.eyebrow {
  margin-bottom: 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.subtitle {
  margin-top: 0.8rem;
  font-size: 1.25rem;
  font-style: italic;
  color: var(--text-muted);
}

.byline { margin-top: 1rem; font-size: 0.9rem; color: var(--text-muted); }

.toc {
  margin-top: 2rem;
  padding-left: 1.4rem;
  columns: 2;
  column-gap: 2.5rem;
  font-size: 0.95rem;
  color: var(--text-faint);
}

.toc li { break-inside: avoid; padding: 0.15rem 0; }
.toc li.unnumbered { list-style: none; }
.toc a { color: var(--text-muted); }
.toc a:hover { color: var(--text); text-decoration: underline; }

.prose section { scroll-margin-top: 1.5rem; }

.prose h2.section-title {
  margin-top: 4.5rem;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.25;
}

.prose h2.section-title .num {
  display: inline-block;
  min-width: 1.8rem;
  color: var(--text-faint);
  font-weight: 400;
}

.prose h3.sub { margin-top: 2.25rem; font-size: 1.2rem; font-weight: 700; }

.prose section > p { margin-top: 1rem; color: var(--text-body); }

.prose section > .entries { margin-top: 1.5rem; border-top: 1px solid var(--rule); }
.prose section > .entries + p { margin-top: 1.5rem; }

blockquote.question {
  margin: 1.75rem 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--text);
  font-size: 1.3rem;
  font-style: italic;
  line-height: 1.45;
}

.refs { list-style: none; margin-top: 1.5rem; font-size: 0.9rem; color: var(--text-muted); }
.refs li { padding-left: 1.5rem; text-indent: -1.5rem; margin-top: 0.6rem; }
.refs a { border-bottom: 1px solid var(--rule); overflow-wrap: anywhere; }
.refs a:hover { border-bottom-color: var(--text); }

/* outlined button (CV PDF download) */
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.75rem;
  padding: 0.7rem 1.3rem;
  border: 1px solid var(--text);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease;
}

.button svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button:hover { background: var(--text); color: var(--bg); }

/* plain list of skills / tools */
.plain {
  margin-top: 1.5rem;
  color: var(--text-muted);
}

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

.site-footer {
  max-width: var(--column);
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-faint);
}

.site-footer ul { list-style: none; display: flex; gap: 1.5rem; }
.site-footer a:hover { color: var(--text); }

/* --------------------------------------------------------------------------
   Small screens
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
  .nav { padding: 0 1rem; }
  .nav-links { gap: 1.1rem; }
  .brand { letter-spacing: 0.16em; font-size: 0.9rem; }
  main { padding: 3rem 1rem 3rem; }
  h1 { font-size: 1.8rem; }
  .toc { columns: 1; }
  .entry { grid-template-columns: 1fr; }
  .entry .when { padding-top: 0; margin-bottom: 0.4rem; }
  .entry h3 { font-size: 1.2rem; }
  .site-footer { padding: 2rem 1rem 3rem; }
}
