/* Jérémie Kemoun — simple, scannable, one idea per line */

:root {
  --bg: #fbfbf8;
  --surface: #ffffff;
  --text: #1b1c19;
  --text-2: #64665e;
  --hair: rgba(40, 52, 40, .13);
  --green: #2f6b4f;
  --blue: #1f45b5;
  --red: #bf262c;
  --bar: rgba(251, 251, 248, .72);
  --press: rgba(40, 52, 40, .06);
  --scrim: rgba(12, 16, 12, .38);
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 20px rgba(0,0,0,.05);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 1.125rem;
  --gutter: max(1.25rem, env(safe-area-inset-left));
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111311;
    --surface: #1a1d1a;
    --text: #ecebe3;
    --text-2: #9d9f96;
    --hair: rgba(230, 240, 230, .12);
    --green: #7fbf9c;
    --blue: #8eaaff;
    --red: #ff6f6a;
    --bar: rgba(17, 19, 17, .7);
    --press: rgba(255, 255, 255, .07);
    --scrim: rgba(0, 0, 0, .55);
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.5 var(--font);
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.locked { overflow: hidden; }
a { color: inherit; }
button { font: inherit; color: inherit; letter-spacing: inherit; }
h1, h2, h3 { margin: 0; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

html[lang="en"] [data-l="fr"],
html[lang="fr"] [data-l="en"] { display: none; }

/* ---------- Bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: .625rem var(--gutter);
  padding-top: max(.625rem, env(safe-area-inset-top));
  background: var(--bar);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
}
.bar::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px;
  background: linear-gradient(var(--hair), transparent);
  opacity: 0; transition: opacity .2s ease; pointer-events: none;
}
.bar.scrolled::after { opacity: .7; }
.bar__name { font-weight: 600; text-decoration: none; opacity: 0; transition: opacity .2s ease; }
.bar.scrolled .bar__name { opacity: 1; }
@media (prefers-reduced-transparency: reduce) {
  .bar { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

.seg { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--press); }
.seg button {
  border: 0; background: none; cursor: pointer;
  padding: .3rem .7rem; border-radius: 7px;
  font-size: .8125rem; font-weight: 600; color: var(--text-2);
  transition: transform .1s ease-out;
}
.seg button:active { transform: scale(.94); }
html[lang="en"] .seg [data-set="en"],
html[lang="fr"] .seg [data-set="fr"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.12); }

/* ---------- Layout ---------- */
.app { transform-origin: 50% 0; }
main { max-width: 46rem; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.5rem, 9vw, 5.5rem) 0 1rem; }
.hero h1 {
  font-size: clamp(2.75rem, 9vw, 4.5rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.04em;
}
.hero__role { margin: 1rem 0 0; font-size: clamp(1.125rem, 2.4vw, 1.375rem); line-height: 1.35; color: var(--text-2); letter-spacing: -.015em; }
.hero__seek {
  display: inline-flex; align-items: center; gap: .6rem;
  margin: 1.5rem 0 0; padding: .6rem 1rem .6rem .85rem;
  border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow);
  font-size: 1rem;
}
.dot { width: .5rem; height: .5rem; border-radius: 50%; background: #34b46f; box-shadow: 0 0 0 3px rgba(52,180,111,.2); flex: none; }

.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.btn {
  display: inline-flex; align-items: center;
  padding: .7rem 1.1rem; border-radius: 999px;
  font-size: .9375rem; font-weight: 600; text-decoration: none;
  background: var(--press);
  transition: transform .1s ease-out, background-color .15s ease;
}
.btn:hover { background: var(--hair); }
.btn:active { transform: scale(.96); }
.btn--main { background: var(--green); color: #fff; }
.btn--main:hover { background: var(--green); filter: brightness(1.08); }
@media (prefers-color-scheme: dark) { .btn--main { color: #0f1a14; } }

/* ---------- Sections ---------- */
.sec { padding-top: clamp(3rem, 7vw, 4.5rem); }
.sec__title {
  margin-bottom: .75rem;
  font-size: .8125rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--green);
}

/* Highlights */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }
.card {
  display: flex; flex-direction: column; gap: .35rem;
  padding: 1.15rem 1.25rem;
  text-align: left; cursor: pointer;
  border: 1px solid var(--hair); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow);
  transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .2s ease;
}
.card:hover { box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 12px 28px rgba(0,0,0,.08); }
.card:active { transform: scale(.97); transition: transform .1s ease-out; }
.card__title { font-size: 1.1875rem; font-weight: 650; letter-spacing: -.02em; line-height: 1.25; }
.card__text { color: var(--text-2); font-size: .9375rem; line-height: 1.4; }
.card__more { margin-top: .4rem; font-size: .875rem; font-weight: 600; color: var(--blue); }
.card__more::after { content: " →"; }

/* Rows: title + organisation, date on the right */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: .85rem 0; border-bottom: 1px solid var(--hair);
}
.rows li:first-child { border-top: 1px solid var(--hair); }
.rows b { display: block; font-weight: 600; }
.rows .org { display: block; color: var(--text-2); font-size: .9375rem; }
.rows .when { flex: none; color: var(--text-2); font-size: .9375rem; font-variant-numeric: tabular-nums; }
.rows--plain li > div { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; width: 100%; }
.rows--plain .org { font-size: 1rem; }
@media (max-width: 420px) { .rows--plain li > div { grid-template-columns: 1fr; gap: 0; } }

/* Flying stats: logbook totals in red */
.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
}
.stats > div { padding: 1rem 1rem 1rem 0; }
.stats > div + div { padding-left: 1rem; border-left: 1px solid var(--hair); }
.stats dt { font-size: .8125rem; color: var(--text-2); line-height: 1.3; min-height: 2.1em; }
.stats dd { margin: .35rem 0 0; font-size: 2.25rem; font-weight: 650; letter-spacing: -.035em; line-height: 1; color: var(--red); font-variant-numeric: tabular-nums; }
.stats dd.small { font-size: 1.125rem; letter-spacing: -.01em; padding-top: .75rem; color: var(--text); }
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stats > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .stats > div:nth-child(n+3) { border-top: 1px solid var(--hair); }
}

/* Outside work */
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; }
.tags > span { padding: .4rem .8rem; border-radius: 999px; background: var(--press); font-size: .9375rem; }
html[lang="en"] .tags > [data-l="fr"], html[lang="fr"] .tags > [data-l="en"] { display: none; }

/* Contact */
.contact { padding-bottom: 1rem; }
.contact__title { font-size: clamp(2rem, 6vw, 2.75rem); font-weight: 700; letter-spacing: -.04em; line-height: 1.05; }

.foot { max-width: 46rem; margin: 0 auto; padding: 3rem var(--gutter) max(2rem, env(safe-area-inset-bottom)); font-size: .8125rem; color: var(--text-2); }

/* ---------- Sheet ---------- */
.scrim { position: fixed; inset: 0; z-index: 30; background: var(--scrim); opacity: 0; }
.sheet {
  position: fixed; z-index: 31; left: 0; right: 0; bottom: 0;
  margin: 0 auto; width: 100%; max-width: 40rem;
  max-height: calc(100dvh - 2.5rem);
  display: flex; flex-direction: column;
  background: var(--surface);
  border-radius: 1.75rem 1.75rem 0 0;
  box-shadow: 0 -10px 40px rgba(0,0,0,.18);
  transform: translateY(110%);
  will-change: transform;
}
.scrim[hidden], .sheet[hidden] { display: none; }
.sheet__grab { flex: none; padding: .5rem 1.5rem .5rem; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.sheet__grab:active { cursor: grabbing; }
.sheet__handle { display: block; width: 2.25rem; height: .3125rem; margin: 0 auto .9rem; border-radius: 99px; background: var(--hair); }
.sheet__top { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; }
.sheet__no { margin: 0; font-size: .8125rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--green); }
.sheet__top h2 { margin-top: .3rem; font-size: 1.75rem; line-height: 1.1; font-weight: 700; letter-spacing: -.035em; }
.sheet__close {
  flex: none; display: grid; place-items: center;
  width: 2rem; height: 2rem; border: 0; border-radius: 50%;
  background: var(--press); color: var(--text-2); cursor: pointer;
  transition: transform .1s ease-out;
}
.sheet__close:active { transform: scale(.9); }
.sheet__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: .75rem 1.5rem max(2rem, env(safe-area-inset-bottom)); }
.sheet__body h3 { margin: 1.5rem 0 .4rem; font-size: 1.0625rem; font-weight: 650; }
.sheet__body ul { margin: 0 0 1em; padding-left: 1.1rem; }
.sheet__body li { margin-bottom: .35rem; }
.sheet__body a { color: var(--blue); }
.sheet__body .aside { color: var(--text-2); font-size: .9375rem; padding-left: .8rem; border-left: 2px solid var(--green); }

@media (prefers-reduced-motion: reduce) {
  .sheet { transform: none !important; transition: opacity .2s ease; }
  .card:active, .btn:active, .seg button:active, .sheet__close:active { transform: none; }
}

/* ---------- Photos ---------- */
.hero__photo {
  display: block; width: 6rem; height: 6rem; margin-bottom: 1.25rem;
  border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 4px var(--surface), var(--shadow);
}
.card { overflow: hidden; }
.card__img {
  display: block; width: calc(100% + 2.5rem); max-width: none;
  margin: -1.15rem -1.25rem .6rem;
  aspect-ratio: 16 / 9; object-fit: cover;
  background: var(--press);
}
.sheet__img {
  display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover;
  border-radius: .875rem; margin: 0 0 1.25rem;
  background: var(--press);
}
.sheet__img--full { aspect-ratio: auto; margin-top: .5rem; border: 1px solid var(--hair); }
.pos-hydrogen { object-position: 50% 30%; }
.pos-top { object-position: 50% 0; }
.sheet__fig { margin: 0 0 1.25rem; }
.sheet__fig .sheet__img { margin-bottom: .5rem; }
.sheet__fig figcaption { font-size: .875rem; color: var(--text-2); }
