:root {
  --fog: #e8ecf1;
  --paper: #f6f8fa;
  --ink: #12202f;
  --slate: #566676;
  --line: #c9d2dc;
  --blue: #2c4bf0;
  --blue-deep: #1b34b8;
  --panel: #0e1a2b;
  --amber: #f5a524;

  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --text: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  color-scheme: light;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--fog);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0;
}

p { margin: 0; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

/* ---------- banner + header ---------- */

.draft-banner {
  margin: 0;
  padding: 0.55rem var(--gutter);
  background: var(--amber);
  color: var(--ink);
  font-family: var(--display);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 1.5rem var(--gutter);
}

.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.top nav { display: flex; align-items: center; gap: clamp(0.9rem, 2.2vw, 1.75rem); font-family: var(--display); font-weight: 500; font-size: 0.975rem; }
.top nav a { text-decoration: none; }
.top nav a:hover { text-decoration: underline; }
.top .nav-cta { background: var(--ink); color: var(--fog); padding: 0.45rem 1rem; border-radius: 999px; }
.top .nav-cta:hover { background: var(--blue); text-decoration: none; }
.top .nav-lang { color: var(--slate); }

@media (max-width: 720px) {
  .top nav a:not(.nav-cta):not(.nav-lang) { display: none; }
}

/* ---------- layout primitives ---------- */

main { display: block; }

.block, .hero {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6.5rem) var(--gutter);
}

.block h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); max-width: 18ch; }
.block-intro { margin-top: 1.1rem; max-width: 38rem; color: var(--slate); }

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-top: clamp(2rem, 5vw, 4rem);
}

.hero h1 {
  font-size: clamp(1.45rem, 2.3vw, 1.9rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.005em;
  max-width: 34ch;
}

.hero-lede { margin-top: 1.75rem; max-width: 34rem; font-size: 1.25rem; color: var(--ink); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2.25rem; }

.btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--fog); }
.btn-light { background: #fff; color: var(--blue-deep); }
.btn-light:hover { background: var(--fog); }

/* the session: the one memorable element */

.session {
  margin: 0;
  position: relative;
  background: var(--panel);
  color: #dbe4f0;
  border-radius: 14px;
  box-shadow: 0.9rem 0.9rem 0 var(--blue);
  overflow: hidden;
}

.session figcaption {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid #22344d;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: #8ea3bd;
}

.session-body { padding: 1.25rem; display: grid; gap: 1.1rem; font-family: var(--mono); font-size: 0.86rem; line-height: 1.6; }
.msg { display: grid; grid-template-columns: 4.6rem 1fr; gap: 0.75rem; }
.who { color: #8ea3bd; }
.msg-me .who { color: var(--amber); }
.msg-me .text { color: #fff; }
.msg code { background: #1b2c46; padding: 0.05em 0.35em; border-radius: 4px; }

.js .session-body .msg { visibility: hidden; }
.js .session-body .msg.is-shown { visibility: visible; }

.caret::after {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--amber);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .caret::after { animation: none; } }

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; }
  .session { box-shadow: 0.5rem 0.5rem 0 var(--blue); margin-right: 0.5rem; }
}
@media (max-width: 480px) {
  .msg { grid-template-columns: 1fr; gap: 0.1rem; }
}

/* ---------- projects ---------- */

.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 2.5rem;
  margin-top: 2.75rem;
}

.project { padding: 1.5rem 0; border-top: 1px solid var(--line); }
.project h3 { font-size: 1.45rem; margin: 0.45rem 0 0.6rem; }
.project p:not(.status) { color: var(--slate); font-size: 1.02rem; }
.project-image { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 1rem; background: #fff; }

.project-featured {
  grid-column: 1 / -1;
  background: var(--blue);
  color: #fff;
  border: 0;
  border-radius: 18px;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1.5rem clamp(2rem, 5vw, 4rem);
  align-items: end;
}
.featured-side { display: flex; flex-direction: column; align-items: flex-start; }
.featured-side .facts { margin-top: 0; }
.project-featured h3 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.03em; margin: 0.9rem 0 1rem; }
.project-featured p:not(.status) { color: #e3e9ff; font-size: 1.12rem; }

.facts { list-style: none; padding: 0; margin: 1.5rem 0 2rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.facts li { font-family: var(--display); font-size: 0.9rem; font-weight: 500; padding: 0.3rem 0.8rem; border: 1px solid rgba(255, 255, 255, 0.45); border-radius: 999px; }

.status { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--display); font-weight: 600; font-size: 0.9rem; }
.status::before { content: ""; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--slate); }
.status-live::before, .status-running::before { background: #5dd39e; }
.status-wip::before { background: var(--amber); }
.status-idea::before { background: transparent; border: 2px solid var(--slate); }

@media (max-width: 880px) {
  .projects { grid-template-columns: 1fr; }
  .project-featured { grid-template-columns: 1fr; }
}

/* ---------- AI method ---------- */

.block-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
  border-top: 1px solid var(--line);
}
.principles { display: grid; gap: 2rem; }
.principles h3 { font-size: 1.35rem; margin-bottom: 0.4rem; }
.principles p { color: var(--slate); }
.principles .toolbox { color: var(--ink); font-family: var(--display); font-weight: 500; font-size: 1rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }

@media (max-width: 880px) { .block-split { grid-template-columns: 1fr; } }

/* ---------- notes ---------- */

.notes { margin-top: 2.75rem; border-top: 1px solid var(--ink); }
.notes article {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr) auto;
  gap: 0.5rem 2rem;
  align-items: baseline;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
}
.notes time { font-family: var(--display); font-weight: 500; font-size: 0.95rem; color: var(--slate); grid-row: span 2; }
.notes h3 { font-size: clamp(1.25rem, 2.4vw, 1.65rem); max-width: 30ch; }
.notes article p:not(.meta) { grid-column: 2; color: var(--slate); max-width: 40rem; font-size: 1.02rem; }
.notes .meta { grid-column: 3; grid-row: 1; font-family: var(--display); font-size: 0.9rem; color: var(--slate); white-space: nowrap; }

@media (max-width: 720px) {
  .notes article { grid-template-columns: 1fr; }
  .notes time, .notes h3, .notes article p:not(.meta), .notes .meta { grid-column: 1; grid-row: auto; }
}

/* ---------- timeline ---------- */

.timeline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin-top: 2.75rem; }
.era { border-top: 4px solid var(--ink); padding-top: 1rem; }
.era:last-child { border-top-color: var(--blue); }
.years { font-family: var(--display); font-weight: 600; font-size: 0.95rem; color: var(--slate); }
.era h3 { font-size: 1.5rem; margin: 0.35rem 0 0.6rem; }
.era p:not(.years) { color: var(--slate); font-size: 1.02rem; }
.cv-link { margin-top: 2.25rem; font-family: var(--display); font-weight: 500; }

@media (max-width: 880px) { .timeline { grid-template-columns: 1fr; } }

/* ---------- contact ---------- */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.offers { margin: 2.25rem 0 0; display: grid; gap: 1.25rem; }
.offers > div { padding-top: 1.1rem; border-top: 1px solid var(--line); }
.offers dt { font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.offers dd { margin: 0.25rem 0 0; color: var(--slate); font-size: 1.02rem; }
.direct { margin-top: 2rem; }

.form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  display: grid;
  gap: 1.25rem;
}

.field { display: grid; gap: 0.4rem; }
.field label { font-family: var(--display); font-weight: 600; font-size: 0.95rem; }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--slate); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); }
.field .invalid { border-color: #c0392b; }
.field .error { color: #a5281b; font-family: var(--display); font-size: 0.9rem; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form .btn { justify-self: start; }
.form .btn[disabled] { opacity: 0.6; cursor: progress; }
.form-status { font-family: var(--display); font-weight: 500; font-size: 1rem; min-height: 1.5em; }
.form-status.is-ok { color: #136a45; }
.form-status.is-error { color: #a5281b; }

@media (max-width: 880px) { .contact { grid-template-columns: 1fr; } }

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

.foot {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 2rem var(--gutter) 3rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--display);
  font-size: 0.95rem;
  color: var(--slate);
}
.foot ul { list-style: none; display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 0; padding: 0; }

/* ---------- small additions for the Rails version ---------- */

.example {
  margin-left: 0.4rem;
  padding: 0.1rem 0.55rem;
  border: 1px dashed var(--slate);
  border-radius: 999px;
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--slate);
  vertical-align: middle;
}

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- richer content: role line, services, detailed timeline, FAQ ---------- */

.role { font-family: var(--display); font-weight: 500; font-size: 1.05rem; color: var(--slate); margin-bottom: 1.1rem; }

.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin-top: 2.75rem; }
.service { border-top: 4px solid var(--ink); padding-top: 1.1rem; }
.service h3 { font-size: 1.4rem; margin-bottom: 0.7rem; }
.service p { color: var(--slate); font-size: 1.02rem; }
.service ul, .era ul { list-style: none; padding: 0; margin: 1.1rem 0 0; display: grid; gap: 0.45rem; }
.service li, .era li { position: relative; padding-left: 1.1rem; font-size: 0.98rem; }
.service li::before, .era li::before { content: ""; position: absolute; left: 0.1rem; top: 0.7em; width: 5px; height: 5px; border-radius: 50%; background: var(--blue); }
@media (max-width: 960px) { .services { grid-template-columns: 1fr; } }

.timeline { display: grid; grid-template-columns: 1fr; gap: 0; margin-top: 2.75rem; border-top: 1px solid var(--ink); }
.era { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 0.5rem 2rem; padding: 2rem 0; border-top: 0; border-bottom: 1px solid var(--line); }
.era:last-child { border-top-color: transparent; }
.era .years { padding-top: 0.35rem; }
.era-body { max-width: 46rem; }
.era-body h3 { font-size: 1.5rem; margin: 0 0 0.7rem; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.logo { border-radius: 50%; }
.era-body > p { color: var(--slate); font-size: 1.02rem; }
.era .more { margin-top: 0.9rem; font-family: var(--display); font-weight: 500; font-size: 0.95rem; }
.book-thumbs { display: flex; gap: 0.6rem; margin-top: 1.1rem; }
.book-thumbs img { height: 76px; width: auto; border-radius: 3px; border: 1px solid var(--line); display: block; }
@media (max-width: 720px) { .era { grid-template-columns: 1fr; } }

.faq details { margin-top: 1.1rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); max-width: 46rem; }
.faq details:first-of-type { margin-top: 2.25rem; }
.faq summary { font-family: var(--display); font-weight: 600; font-size: 1.15rem; cursor: pointer; }
.faq summary::marker { color: var(--blue); }
.faq details p { margin-top: 0.7rem; color: var(--slate); font-size: 1.02rem; }

/* ---------- multi-page additions ---------- */

.top nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
.top nav a { white-space: nowrap; }
@media (max-width: 720px) {
  .top nav a:not(.nav-cta):not(.nav-lang) { display: inline; font-size: 0.9rem; }
  .top { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}

.page-head { padding-bottom: 1rem; }
.page-head h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); max-width: 18ch; font-stretch: 94%; }
.page-head .block-intro { max-width: 46rem; }
.page-head .projects, .page-head .notes { margin-top: 2.75rem; }

.about-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.portrait { border-radius: 50%; object-fit: cover; width: 220px; height: 220px; border: 1px solid var(--line); }
@media (max-width: 720px) { .about-head { grid-template-columns: 1fr; } .portrait { width: 140px; height: 140px; order: -1; } }

.section-more { margin-top: 1.75rem; font-family: var(--display); font-weight: 600; }
.teaser { border-top: 1px solid var(--line); }
.teaser h2 { font-size: clamp(1.45rem, 2.3vw, 1.9rem); font-weight: 600; line-height: 1.3; letter-spacing: -0.005em; max-width: 30ch; }
.services-teaser .services { margin-bottom: 2.25rem; }

.notes h3 a { text-decoration: none; }
.notes h3 a:hover { text-decoration: underline; }

.note { max-width: 46rem; }
.note .back { font-family: var(--display); font-weight: 500; margin-bottom: 1.5rem; }
.note h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); font-stretch: 94%; }
.note-meta { margin-top: 1rem; color: var(--slate); font-family: var(--display); }
.prose { margin-top: 2.25rem; }
.prose h2 { font-size: 1.6rem; margin: 2.25rem 0 0.6rem; max-width: none; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: 0.35rem; }
.prose a { color: var(--blue-deep); }
.note-cta { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-family: var(--display); font-weight: 500; }

#offres .offers { margin-top: 2rem; max-width: 46rem; }
#offres h2, #faq h2, #ce-que-je-fais h2 { max-width: none; }
.contact { border-top: 1px solid var(--line); }

