:root{
  --bg: #08090b;
  --surface: #101318;
  --surface-2: #161a21;
  --line: #23272f;
  --white: #f2f3f5;
  --muted: #8b919c;
  --blue: #1f8fe0;
  --blue-bright: #4fc3ff;
  --blue-deep: #0c4d7a;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  background: var(--bg);
  color-scheme: dark;
}

body{
  margin:0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; margin: 0; color: var(--white); }

.mono{
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.01em;
}

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

.wrap{
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- NAV ---------- */
.nav{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8,9,11,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap{
  display:flex;
  align-items:center;
  justify-content: space-between;
  height: 76px;
}
.brand{ display:flex; align-items:center; gap:12px; }
.brand-mark{ width:34px; height:34px; flex-shrink:0; }
.brand-name{ font-size: 19px; font-weight: 600; }
.brand-name span{ color: var(--blue-bright); }

.nav-links{ display:flex; gap: 36px; }
.nav-links a{
  font-size: 14px;
  color: var(--muted);
  transition: color .2s ease;
  display:flex;
  align-items:baseline;
  gap:6px;
}
.nav-links a:hover, .nav-links a.active{ color: var(--white); }
.soon-dot{
  width:5px; height:5px; border-radius:50%;
  background: var(--blue);
  display:inline-block;
}

@media (max-width: 720px){ .nav-links{ display:none; } }

/* ---------- HERO ---------- */
.hero{
  position: relative;
  padding: 96px 0 88px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-grid{
  display:grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items:center;
}
@media (max-width: 860px){ .hero-grid{ grid-template-columns: 1fr; } }

.eyebrow-line{
  display:flex; align-items:center; gap:10px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 22px;
}
.eyebrow-line .dash{
  width: 28px; height: 1px; background: var(--blue);
}

.hero h1{
  font-size: clamp(40px, 5.4vw, 64px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.hero p.lead{
  margin-top: 24px;
  max-width: 46ch;
  color: var(--muted);
  font-size: 17px;
}

.hero-name{
  margin-top: 14px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 19px;
  font-weight: 500;
  color: var(--blue-bright);
}

.hero p.lead-small{
  font-size: 14.5px;
  margin-top: 16px;
  padding-left: 16px;
  border-left: 2px solid var(--blue-deep);
}

@media (max-width: 480px){
  .hero-art-img{ max-width: 280px; }
}

.hero-cta{
  margin-top: 36px;
  display:flex; gap: 16px; flex-wrap: wrap;
}
.btn{
  padding: 13px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--line);
  transition: border-color .2s ease, background .2s ease;
}
.btn-primary{
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  border-color: transparent;
}
.btn-primary:hover{ filter: brightness(1.12); }
.btn-ghost:hover{ border-color: var(--blue); color: var(--blue-bright); }

.hero-art{ position: relative; }
.hero-art-img{
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
  margin: 0 auto;
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
}

/* ---------- SECTION SHELL ---------- */
section{ padding: 88px 0; border-bottom: 1px solid var(--line); }
.section-head{ max-width: 56ch; margin-bottom: 48px; }
.section-head h2{ font-size: clamp(26px, 3vw, 34px); font-weight: 600; }
.section-head p{ margin-top: 14px; color: var(--muted); font-size: 16px; }

/* ---------- ABOUT / TWO-COLUMN TEXT ---------- */
.about-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
@media (max-width: 780px){ .about-grid{ grid-template-columns: 1fr; gap: 36px; } }

.about-grid p{ color: var(--muted); font-size: 16px; }
.about-grid h3{ font-size: 19px; font-weight: 600; margin-bottom: 12px; }
.about-grid h3 .num{
  color: var(--blue-bright);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  margin-right: 10px;
}

/* ---------- TIMELINE (page historique) ---------- */
.timeline{ position: relative; padding-left: 4px; }
.tl-item{
  position: relative;
  display:grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.tl-item:first-child{ border-top: none; }
.tl-year{
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--blue-bright);
  padding-top: 2px;
}
.tl-node{
  position:absolute;
  left: -4px;
  top: 32px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--blue);
}
.tl-body h4{
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  font-weight: 500;
  margin: 0 0 6px 0;
}
.tl-body p{ margin:0; color: var(--muted); font-size: 15px; }

@media (max-width: 560px){
  .tl-item{ grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- CARD GRIDS (domaines, projets, instruments) ---------- */
.domains-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 860px){ .domains-grid{ grid-template-columns: 1fr; } }

.domain-card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  transition: border-color .2s ease, transform .2s ease;
}
.domain-card:hover{ border-color: var(--blue); transform: translateY(-2px); }

.domain-icon{ width: 30px; height: 30px; margin-bottom: 20px; }
.domain-card h3{ font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.domain-card p{ color: var(--muted); font-size: 14.5px; margin: 0 0 18px 0; }

.tag{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--blue-bright);
  padding: 5px 10px;
  border: 1px solid var(--blue-deep);
  border-radius: 20px;
  background: rgba(31,143,224,0.08);
}
a.tag{ transition: border-color .2s ease, background .2s ease; }
a.tag:hover{ border-color: var(--blue); background: rgba(31,143,224,0.16); }

/* Instrument / equipment cards */
.instrument-grid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 780px){ .instrument-grid{ grid-template-columns: 1fr; } }

.instrument-card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 26px;
}
.instrument-head{
  display:flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
}
.instrument-card h3{ font-size: 17px; font-weight: 600; }
.instrument-role{
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--blue-bright);
  margin-bottom: 14px;
}
.instrument-card p{ color: var(--muted); font-size: 14.5px; margin: 0 0 16px 0; }
.spec-list{ list-style: none; margin: 0 0 16px 0; padding: 0; display: grid; gap: 6px; }
.spec-list li{
  display:flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 6px;
}
.spec-list li span:last-child{ color: var(--white); font-family: 'JetBrains Mono', monospace; font-size: 12.5px; }

/* Repo / code callout block */
.repo-card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 26px 28px;
  margin-top: 28px;
}
.repo-card-head{
  display:flex;
  align-items:center;
  gap: 10px;
  margin-bottom: 12px;
}
.repo-card-head svg{ width: 20px; height: 20px; flex-shrink: 0; }
.repo-card-head span{ font-family: 'JetBrains Mono', monospace; font-size: 14px; color: var(--blue-bright); }
.repo-card p{ color: var(--muted); font-size: 15px; margin: 0 0 10px 0; }
.repo-card p:last-child{ margin-bottom: 0; }
.repo-card ul{ color: var(--muted); font-size: 15px; margin: 10px 0; padding-left: 20px; }
.repo-card li{ margin-bottom: 6px; }

/* ---------- FOOTER ---------- */
footer{ padding: 48px 0; border-bottom: none; }
.footer-row{
  display:flex;
  justify-content: space-between;
  align-items:center;
  flex-wrap: wrap;
  gap: 16px;
}
footer .brand{ opacity: .9; }
footer p{ color: var(--muted); font-size: 13.5px; margin:0; }

.social-links{ display:flex; gap: 16px; align-items:center; }
.social-links a{
  display:flex; align-items:center; justify-content:center;
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color .2s ease, color .2s ease;
  color: var(--muted);
}
.social-links a:hover{ border-color: var(--blue); color: var(--blue-bright); }
.social-links svg{ width: 17px; height: 17px; }
