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

/* ─── Tokens ─── */
:root {
  --bg:     #FFFBF6;
  --text:   #1F1F1F;
  --a1:     #082841;
  --a2:     #538CB5;
  --border: rgba(31, 31, 31, .10);
  --muted:  rgba(31, 31, 31, .38);
  --hov:    rgba(31, 31, 31, .03);
  --serif:  'Noto Serif Display', Georgia, serif;
  --sans:   'Neue Haas Grotesk Display Pro', 'Helvetica Neue', Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:     #1F1F1F;
    --text:   #FFFBF6;
    --border: rgba(255, 251, 246, .10);
    --muted:  rgba(255, 251, 246, .36);
    --hov:    rgba(255, 251, 246, .04);
  }
}

[data-theme="dark"] {
  --bg:     #1F1F1F;
  --text:   #FFFBF6;
  --border: rgba(255, 251, 246, .10);
  --muted:  rgba(255, 251, 246, .36);
  --hov:    rgba(255, 251, 246, .04);
}

[data-theme="light"] {
  --bg:     #FFFBF6;
  --text:   #1F1F1F;
  --border: rgba(31, 31, 31, .10);
  --muted:  rgba(31, 31, 31, .38);
  --hov:    rgba(31, 31, 31, .03);
}

/* ─── Base ─── */
html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  overflow: hidden;
  transition: background .35s, color .35s;
}

/* ─── Animations ─── */
@keyframes up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  animation-name: up;
  animation-duration: .85s;
  animation-timing-function: cubic-bezier(.22, 1, .36, 1);
  animation-fill-mode: forwards;
  animation-play-state: paused;
}
.d1 { animation-delay: .04s; }
.d2 { animation-delay: .12s; }
.d3 { animation-delay: .20s; }
.d4 { animation-delay: .30s; }
.d5 { animation-delay: .40s; }
.d6 { animation-delay: .52s; }
.d7 { animation-delay: .62s; }

/* ─── Wrapper ─── */
.wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* ─── Header ─── */
header {
  flex-shrink: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  transition: background .35s;
  position: relative;
  z-index: 10;
}

.h-name {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.h-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.h-meta {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .07em;
}

.toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s, color .2s;
  flex-shrink: 0;
}
.toggle:hover { border-color: var(--text); color: var(--text); }

/* ─── Main grid ─── */
main {
  flex: 1;
  display: grid;
  grid-template-columns: 42% 58%;
  min-height: 0;
}

/* ─── Left: photo + identity ─── */
.left {
  display: grid;
  grid-template-rows: 3fr 2fr;
  overflow: hidden;
  border-right: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.photo {
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom;
  display: block;
}

.photo-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.left-content {
  overflow: hidden;
  padding: 28px 48px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Footer dans la colonne gauche */
.lf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  margin-top: auto;
  border-top: 1px solid var(--border);
}

.lf-copy {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.lf-link {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color .2s;
}
.lf-link:hover { color: var(--text); }

.name {
  font-family: var(--serif);
  font-size: clamp(38px, 4.8vw, 72px);
  font-weight: 200;
  line-height: 1.1;
  letter-spacing: -.025em;
  color: var(--text);
}

.name .i { 
  color: var(--text);
  font-weight: 400;
}

.bio {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 260px;
}

/* ─── Right: bento grid ─── */
.bento {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr;
  grid-template-rows: repeat(3, 1fr);
  height: 100%;
  overflow: hidden;
}

/* Grid placements — même hauteur de ligne, largeurs asymétriques */
.c-agatha     { grid-column: 1 / 3; }
.c-consulting { grid-column: 3 / 4; }
.c-articles   { grid-column: 1 / 4; }
.c-x          { grid-column: 1 / 2; }
.c-linkedin   { grid-column: 2 / 4; }

/* Séparateurs internes */
.c-agatha     { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.c-consulting { border-bottom: 1px solid var(--border); }
.c-articles   { border-bottom: 1px solid var(--border); }
.c-x          { border-right: 1px solid var(--border); }

/* ─── Cards ─── */
.card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 48px;
  text-decoration: none;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: background .22s ease;
  overflow: hidden;
}

.card:hover,
.card:focus-visible { background: var(--hov); }

.card:hover .c-arrow,
.card:focus-visible .c-arrow {
  transform: translate(4px, -4px);
  opacity: 1;
}

.card.feat {
  background: var(--a1);
  color: #FFFBF6;
}

.card.feat .c-num,
.card.feat .c-sub,
.card.feat .c-arrow { color: rgba(255, 251, 246, .38); }

.card.feat:hover,
.card.feat:focus-visible { background: var(--a2); }

/* Card internals */
.c-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.c-num {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .06em;
}

.c-arrow {
  font-size: 18px;
  color: var(--muted);
  transition: transform .22s ease, opacity .22s ease;
  opacity: .55;
}

.c-sub {
  font-size: 10px;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.c-title {
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 46px);
  font-weight: 300;
  line-height: .97;
  letter-spacing: -.02em;
}

.c-agatha .c-title {
  font-size: clamp(36px, 4.2vw, 60px);
}

/* ─── Mobile ─── */
@media (max-width: 768px) {
  body { overflow: auto; }
  html, body { height: auto; }
  .wrapper { height: auto; min-height: 100vh; }

  header { padding: 0 24px; }

  main {
    grid-template-columns: 1fr;
    flex: none;
  }

  /* Photo + présentation côte à côte */
  .left {
    display: flex;
    flex-direction: row;
    height: 300px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .photo {
    flex: 0 0 42vw;
    width: 42vw;
    aspect-ratio: 1;
    border-bottom: none;
    border-right: 1px solid var(--border);
  }

  .left-content {
    flex: 1;
    padding: 20px 20px 20px;
    justify-content: flex-end;
    gap: 8px;
  }

  .name { font-size: clamp(22px, 6.5vw, 36px); }
  .bio  { font-size: 12px; }
  .lf   { padding-top: 12px; margin-top: 8px; }

  .bento { height: 105vw; }

  .card {
    padding: 18px 20px;
    min-height: 0;
  }

  .c-title { font-size: clamp(12px, 3.8vw, 20px); }
  .c-agatha .c-title { font-size: clamp(18px, 5.5vw, 30px); }
}
