/* Report: the long-form page the agents write. Editorial and typography-led; agent colours are
   small accents only (bylines, hairlines, counters). Every [data-reveal] element is visible by default. */

.report {
  --section-pad: clamp(4.5rem, 2.6rem + 6.4vw, 8.75rem);
  --font-display: "Inter Display", "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --card-bg: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
  --card-hover: rgba(255,255,255,.05);
  position: relative;
  display: block;
  /* Symbols such as ⏺ ↗ ✓ must never turn into colour emoji. */
  font-variant-emoji: text;
}

.report-wrap {
  position: relative;
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
}

.report :is(p, li) strong { color: var(--text); font-weight: 620; }
.report .glyph { display: inline-block; }

/* ---------- Shared section anatomy ---------- */

.report-section,
.report-verdict,
.report-contact {
  position: relative;
  padding-block: var(--section-pad);
  /* Dock links land on the byline, not on the section's top padding. */
  scroll-margin-top: calc(2.25rem - var(--section-pad));
}

/* Chapter mark: a hairline with a short segment in the agent's colour. */
.report-section > .report-wrap::before {
  content: '';
  position: absolute;
  top: calc(-1 * var(--section-pad));
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--agent) 0 2.75rem, var(--line) 2.75rem);
}

.section-head {
  display: grid;
  gap: clamp(1.15rem, .8rem + 1.2vw, 1.9rem);
  margin-bottom: clamp(2.5rem, 1.6rem + 3.6vw, 4.75rem);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--step-5);
  font-weight: 620;
  line-height: 1.02;
  letter-spacing: -.045em;
}
.section-title em,
.hero-name em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -.028em;
}

/* Each title line rises from its own baseline mask (see the reveal rules below). */
.title-line {
  display: block;
  padding: .06em .12em .26em 0;
  margin-bottom: -.2em;
}
.title-line > * { display: block; }

.section-intro {
  max-width: 44rem;
  color: var(--text-dim);
  font-size: var(--step-1);
  line-height: 1.6;
}

/* Agent byline: every agent section is signed by the agent that produced it. */
.agent-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 1rem;
}
.agent-avatar {
  position: relative;
  flex: none;
  display: inline-grid;
  place-items: center;
}
.agent-avatar > svg { display: block; overflow: visible; }
.agent-byline > .agent-avatar { width: 48px; height: 52px; }
.agent-byline > .agent-avatar::before {
  content: '';
  position: absolute;
  inset: 4px -2px -3px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--agent) 22%, transparent), transparent);
}
.byline-text { display: grid; gap: .15rem; min-width: 0; }
.byline-label { color: var(--agent); font-weight: 600; }
.byline-log {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .01em;
  text-transform: none;
  overflow-wrap: anywhere;
}
.byline-result {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .38rem .8rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255,255,255,.03);
  color: var(--text);
  font: 500 .8rem/1.3 var(--font-mono);
  letter-spacing: .01em;
}
.byline-check { color: var(--ok); font-weight: 700; }
.byline-index { margin-left: auto; color: var(--muted); letter-spacing: .14em; }

.chip-list { display: flex; flex-wrap: wrap; gap: .4rem; }

/* Highlights: a bold label above a sentence (content texts start lowercase, after the label). */
.hl-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(1.25rem, 3vw, 2.5rem);
}
.hl { padding-block: 1rem; border-top: 1px solid var(--line); }
.hl-label { display: block; margin-bottom: .3rem; color: var(--text); font-size: .95rem; font-weight: 620; letter-spacing: -.01em; }
.hl-text { color: var(--text-dim); font-size: .94rem; line-height: 1.6; }
.hl-text::first-letter { text-transform: uppercase; }

/* ---------- Hero (#top) ---------- */

.report-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: calc(100vh - var(--topbar-h));
  min-height: calc(100svh - var(--topbar-h));
  padding-block: clamp(1rem, 3.4vh, 3rem) clamp(1rem, 2.6vh, 2rem);
}

.hero-backdrop {
  position: absolute;
  inset: calc(-1 * var(--topbar-h)) 0 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(38% 46% at 79% 46%, rgba(217,119,87,.12), transparent 72%),
    radial-gradient(34% 40% at 14% 34%, rgba(255,229,46,.055), transparent 70%);
}
.hero-backdrop::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.085) 1px, transparent 1.4px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 46% 58% at 78% 50%, #000 12%, transparent 72%);
  mask-image: radial-gradient(ellipse 46% 58% at 78% 50%, #000 12%, transparent 72%);
}

.hero-grid {
  align-self: center;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  grid-template-areas:
    "id      convo"
    "name    convo"
    "role    convo"
    "about   convo"
    "actions convo";
  grid-template-rows: repeat(4, auto) 1fr;
  column-gap: clamp(2rem, 5vw, 5.5rem);
  padding-block: clamp(.5rem, 2vh, 1.5rem);
}

.hero-id {
  grid-area: id;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: clamp(1.1rem, 3vh, 2.1rem);
}
.hero-portrait {
  flex: none;
  width: clamp(58px, 4.4vw, 70px);
  height: auto;
  aspect-ratio: 1;
  padding: 3px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
  object-fit: cover;
  box-shadow: 0 0 0 6px rgba(255,229,46,.07), 0 12px 30px -12px rgba(0,0,0,.7);
}
.hero-id-text { display: grid; gap: .3rem; min-width: 0; }
.hero-kicker { display: flex; align-items: center; gap: .6rem; color: var(--text); }
.hero-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255,229,46,.14);
}
.hero-date { color: var(--muted); letter-spacing: .06em; }

.hero-name {
  grid-area: name;
  font-family: var(--font-display);
  font-size: clamp(3.3rem, min(8.6vw, 14vh), 8.6rem);
  font-weight: 650;
  line-height: .9;
  letter-spacing: -.056em;
}
.hero-name em { letter-spacing: -.03em; padding-right: .04em; }
/* No descenders in the name: a tighter mask keeps the rising line off the role below. */
.hero-name .title-line { padding-bottom: .1em; margin-bottom: -.1em; }

.hero-role {
  grid-area: role;
  margin-top: clamp(1rem, 2.6vh, 1.6rem);
  color: var(--text);
  font-size: var(--step-2);
  font-weight: 520;
  line-height: 1.3;
  letter-spacing: -.02em;
}
.hero-role-main { color: var(--accent); }

.hero-about {
  grid-area: about;
  display: grid;
  gap: .7rem;
  max-width: 35rem;
  margin-top: clamp(.8rem, 2vh, 1.25rem);
}
.hero-location { display: inline-flex; align-items: center; gap: .6rem; color: var(--text-dim); }
.hero-location::before {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--accent);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}
.hero-summary { color: var(--text-dim); font-size: var(--step-0); line-height: 1.65; }

.hero-actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: .75rem;
  margin-top: clamp(1.25rem, 3.4vh, 2.1rem);
}

/* The conversation card: a compact Claude Code window, morph target of the intro window. */
.hero-convo {
  grid-area: convo;
  align-self: center;
  justify-self: end;
  width: min(100%, 31.5rem);
  overflow: hidden;
  border: 1px solid var(--term-line);
  border-radius: var(--radius);
  background: var(--term-bg);
  color: var(--term-text);
  font-family: var(--font-mono);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 50px 90px -40px rgba(0,0,0,.85),
    0 22px 120px -44px rgba(217,119,87,.5);
}
.convo-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  padding: 0 4.6rem;
  border-bottom: 1px solid var(--term-line);
  background: var(--term-bar);
}
.convo-dots { position: absolute; left: .95rem; top: 50%; display: flex; gap: 7px; transform: translateY(-50%); }
.convo-dots i { display: block; width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.25); }
.convo-dots i:nth-child(2) { background: #febc2e; }
.convo-dots i:nth-child(3) { background: #28c840; }
.convo-title {
  overflow: hidden;
  color: var(--term-dim);
  font-size: .72rem;
  letter-spacing: .01em;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.convo-body {
  display: grid;
  gap: .85rem;
  padding: 1.1rem 1.15rem 1.15rem;
  font-size: .82rem;
  line-height: 1.6;
}
.convo-body > p { display: flex; gap: .75ch; }
.convo-glyph { flex: none; width: 1.4ch; color: var(--term-dim); text-align: center; }
.convo-prompt {
  padding: .7rem .8rem;
  border-radius: 8px;
  background: rgba(255,255,255,.05);
  color: var(--term-text);
}
.convo-answer { padding-inline: .8rem; color: var(--term-text); }
.convo-bullet { color: var(--ok); }
/* Drawn, not typed: the same bullet as the intro window's transcript. */
.convo-dot { display: inline-block; width: .62em; height: .62em; border-radius: 50%; background: currentColor; transform: translateY(-.04em); }
.convo-stats {
  margin-top: -.55rem;
  padding-inline: calc(.8rem + 2.15ch) .8rem;
  color: var(--term-dim);
  font-size: .76rem;
}
.convo-team {
  display: flex;
  align-items: flex-end;
  gap: .3rem;
  margin-top: .15rem;
  padding: .85rem .8rem 0;
  border-top: 1px dashed var(--term-line);
}
.convo-team .agent-avatar { width: 26px; height: 29px; }
/* The row already ends with a ✓: no badge on each tiny robot (same for the "found by" chips). */
:is(.convo-team, .found-agent) .robot .robot-check { display: none; }
.convo-check {
  margin-left: auto;
  align-self: center;
  color: var(--ok);
  font-size: .95rem;
}

.hero-foot { display: flex; align-items: center; margin-top: clamp(1rem, 3.2vh, 2.25rem); }
.hero-cue {
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  min-height: 44px;
  color: var(--text-dim);
  transition: color .2s ease;
}
.hero-cue-track {
  position: relative;
  flex: none;
  width: 16px;
  height: 26px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
}
.hero-cue-track > i {
  position: absolute;
  top: 5px;
  left: 50%;
  width: 2px;
  height: 6px;
  margin-left: -1px;
  border-radius: 2px;
  background: var(--accent);
  animation: report-cue 1.9s var(--ease-in-out) infinite;
}
@keyframes report-cue {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  75%, 100% { opacity: 0; transform: translateY(9px); }
}

/* ---------- Verdict ---------- */

.report-verdict {
  border-top: 1px solid var(--line);
  background:
    radial-gradient(60% 50% at 85% 0%, rgba(255,229,46,.05), transparent 70%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 70%);
}

.verdict-head {
  display: grid;
  justify-items: start;
  gap: 1.4rem;
  margin-bottom: clamp(2.25rem, 1.5rem + 3vw, 4rem);
}
.verdict-kicker { display: inline-flex; align-items: center; gap: .6rem; color: var(--accent); }
.spark { color: var(--claude); font-size: 1rem; line-height: 1; }
.report-verdict .section-title { font-size: var(--step-6); }

.verdict-label { margin-bottom: .85rem; color: var(--muted); }
.verdict-prompt {
  display: flex;
  gap: .8rem;
  padding: .95rem 1.1rem;
  border: 1px solid var(--term-line);
  border-radius: var(--radius-sm);
  background: var(--term-bg);
  color: var(--term-text);
  font: .85rem/1.55 var(--font-mono);
}
.prompt-glyph { flex: none; color: var(--claude); }

/* Question and short answer face each other, like the two turns of the conversation. */
.verdict-qa {
  display: grid;
  grid-template-columns: minmax(0, 23rem) minmax(0, 1fr);
  align-items: start;
  gap: 2rem clamp(2rem, 5vw, 5rem);
  padding-block: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  margin-bottom: clamp(3rem, 2rem + 4vw, 5.5rem);
  border-block: 1px solid var(--line);
}
.verdict-short .verdict-label { color: var(--accent); }
.verdict-lead {
  max-width: 50rem;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -.022em;
  text-wrap: pretty;
}

.verdict-reasons > .verdict-label { margin-bottom: 1.4rem; }
.reason-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(.75rem, 1.4vw, 1.1rem);
}
.reason {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  padding: clamp(1.35rem, 1rem + 1.1vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
}
.reason:nth-child(n + 4) { grid-column: span 3; }
.reason-num { display: flex; align-items: center; gap: .8rem; color: var(--accent); font-size: .78rem; }
.reason-num::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.reason-title { font-size: var(--step-2); font-weight: 620; line-height: 1.2; letter-spacing: -.028em; }
.reason-text { color: var(--text-dim); font-size: .97rem; line-height: 1.65; }
.found-by {
  display: grid;
  gap: .65rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.found-label { color: var(--muted); font-size: .66rem; }
.found-agents { display: flex; flex-wrap: wrap; gap: .45rem; }
.found-agent {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 36px;
  padding: .2rem .8rem .2rem .3rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255,255,255,.025);
  color: var(--text);
  font-size: .86rem;
  font-weight: 520;
  transition: border-color .2s ease, background-color .2s ease;
}
.found-agent .agent-avatar { width: 24px; height: 26px; }

.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: clamp(3rem, 2rem + 4vw, 5.5rem);
  border-top: 1px solid var(--line);
}
.metric { display: grid; align-content: start; gap: .6rem; padding: 1.75rem 1.25rem 0 0; }
.metric + .metric { padding-left: clamp(1rem, 2vw, 1.5rem); border-left: 1px solid var(--line); }
.metric-value {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 1.5rem + 3.2vw, 4.6rem);
  font-weight: 520;
  font-variant-numeric: tabular-nums;
  line-height: .95;
  letter-spacing: -.05em;
}
.metric-label { max-width: 15rem; color: var(--muted); font-size: .92rem; line-height: 1.45; }

.verdict-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: clamp(2.5rem, 2rem + 2vw, 3.75rem); }

/* ---------- Expériences: vertical timeline ---------- */

.timeline {
  --when: 12.5rem;
  --rail: 3.25rem;
  position: relative;
  display: grid;
  gap: clamp(1.25rem, 2.6vw, 2.25rem);
}
.timeline::before {
  content: '';
  position: absolute;
  top: 1.5rem;
  bottom: 3rem;
  left: calc(var(--when) + var(--rail) / 2);
  width: 1px;
  background: linear-gradient(var(--accent), var(--line-strong) 14rem, var(--line) 75%, transparent);
}
.xp { position: relative; display: grid; grid-template-columns: var(--when) var(--rail) minmax(0, 1fr); }
.xp-when { display: grid; justify-items: end; align-content: start; gap: .6rem; padding-top: 1.85rem; text-align: right; }
.xp-period { color: var(--text); font-size: .74rem; }
.xp-now {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .3rem .65rem;
  border: 1px solid rgba(255,229,46,.28);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .68rem;
}
.xp-pulse { position: relative; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.xp-pulse::after,
.xp.is-current .xp-node::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent);
  animation: report-pulse 2.2s var(--ease-out) infinite;
}
@keyframes report-pulse {
  from { opacity: .55; transform: scale(1); }
  to { opacity: 0; transform: scale(3.2); }
}
.xp-node {
  position: relative;
  z-index: 1;
  justify-self: center;
  width: 11px;
  height: 11px;
  margin-top: 2.05rem;
  border: 1px solid var(--muted);
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 0 0 6px var(--bg);
}
.xp.is-current .xp-node { border-color: var(--accent); background: var(--accent); }

.xp-card {
  padding: clamp(1.4rem, 1rem + 1.6vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
}
.xp.is-current .xp-card {
  border-color: rgba(255,229,46,.2);
  background: linear-gradient(180deg, rgba(255,229,46,.045), rgba(255,255,255,.012) 45%);
}
.xp-role { font-size: var(--step-3); font-weight: 620; letter-spacing: -.035em; }
.xp-org { margin-top: .5rem; color: var(--text-dim); font-size: var(--step-1); }
.xp-sep { margin-inline: .1rem; color: var(--muted); }
.xp-meta { margin-top: .55rem; color: var(--muted); font-family: var(--font-mono); font-size: .8rem; letter-spacing: .01em; }
.xp-project { color: var(--agent); font-weight: 600; }
.xp-desc { max-width: 64ch; margin-top: 1.3rem; color: var(--text-dim); line-height: 1.65; }
.xp-card .hl-list { margin-top: 1.6rem; }
.xp-card .chip-list { margin-top: 1.5rem; }

/* ---------- Compétences ---------- */

.skill-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.75rem, 1.4vw, 1rem); }
.skill {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: 1.5rem 1.4rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card-bg);
}
.skill::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 1.4rem;
  width: 2.25rem;
  height: 2px;
  border-radius: 2px;
  background: var(--agent);
}
.skill-num { color: var(--muted); }
.skill-name { font-size: var(--step-1); font-weight: 620; line-height: 1.25; letter-spacing: -.02em; }
.skill-text { color: var(--text-dim); font-size: .94rem; line-height: 1.6; }
.evidence { display: grid; gap: .55rem; margin-top: auto; padding-top: .9rem; }
.evidence-label { color: var(--muted); font-size: .64rem; }
.evidence-list { display: flex; flex-wrap: wrap; gap: .35rem; }
.evidence-list > li {
  display: inline-flex;
  align-items: baseline;
  gap: .4rem;
  padding: .3rem .55rem;
  border: 1px solid rgba(127,212,139,.2);
  border-radius: 6px;
  background: rgba(127,212,139,.06);
  color: var(--text-dim);
  font-size: .8rem;
  line-height: 1.35;
}
.evidence-check { color: var(--ok); font-weight: 700; }

/* ---------- Technologies: a spec sheet of 2-line chips ---------- */

.tech-groups { border-bottom: 1px solid var(--line); }
.tech-group {
  display: grid;
  grid-template-columns: minmax(0, 14.5rem) minmax(0, 1fr);
  align-items: start;
  gap: .9rem 2rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
}
.tech-group-name { display: flex; align-items: baseline; gap: .65rem; padding-top: .75rem; color: var(--text); }
.tech-count { color: var(--agent); }
.tech-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.tech {
  display: grid;
  gap: .12rem;
  min-width: 0;
  padding: .6rem .9rem .65rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.028);
  transition: border-color .2s ease, background-color .2s ease;
}
.tech-name { color: var(--text); font-size: .98rem; font-weight: 600; letter-spacing: -.01em; }
.tech-used { color: var(--muted); font: 500 .72rem/1.4 var(--font-mono); letter-spacing: .01em; }

/* ---------- IA agentique ---------- */

.ia-quote {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.1rem clamp(1.25rem, 3vw, 2.5rem);
  margin-bottom: clamp(2.5rem, 1.6rem + 3.6vw, 4.5rem);
  padding-block: clamp(1.75rem, 1rem + 3vw, 3.5rem);
  border-block: 1px solid var(--line);
}
.ia-quote-mark { width: clamp(2.2rem, 1.6rem + 2.4vw, 3.6rem); height: auto; margin-top: .45em; fill: var(--accent); }
.ia-quote-text {
  max-width: 24ch;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, .9rem + 3.6vw, 4rem);
  font-style: italic;
  line-height: 1.12;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.ia-quote-by { grid-column: 2; display: flex; align-items: center; gap: .8rem; color: var(--muted); }
.ia-quote-by::before { content: ''; width: 2rem; height: 1px; background: var(--accent); }

.ia-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.75rem, 1.4vw, 1rem); }
.ia-card {
  display: grid;
  align-content: start;
  gap: .7rem;
  padding: clamp(1.4rem, 1rem + 1.4vw, 2.2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
}
.ia-context { color: var(--agent); }
.ia-title { font-size: var(--step-2); font-weight: 620; letter-spacing: -.028em; }
.ia-text { color: var(--text-dim); line-height: 1.65; }

/* ---------- Projets ---------- */

/* One project per row: the visual above the text (side by side on wide screens, see below). */
.project-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}
.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  scroll-margin-top: 1.5rem;
}
.project-body { flex: 1; display: flex; flex-direction: column; gap: 1rem; padding: clamp(1.4rem, 1rem + 1.6vw, 2.4rem); }
.project-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1rem; color: var(--muted); }
.project-period { color: var(--accent); }
.project-name { font-family: var(--font-display); font-size: var(--step-5); font-weight: 650; line-height: 1; letter-spacing: -.05em; }
.project-name::after {
  content: '';
  display: inline-block;
  width: .15em;
  height: .15em;
  margin-left: .05em;
  border-radius: 2px;
  background: var(--accent);
}
.project-tagline { color: var(--text); font-family: var(--font-serif); font-size: var(--step-2); font-style: italic; line-height: 1.3; }
.project-desc { color: var(--text-dim); line-height: 1.65; }
.project-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem clamp(1.5rem, 3vw, 2.75rem);
  padding-block: 1.1rem;
  border-block: 1px solid var(--line);
}
.pm { display: grid; gap: .25rem; }
.pm-value {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 520;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -.045em;
}
.pm-label { color: var(--muted); font-size: .9rem; }

.project-details { border-bottom: 1px solid var(--line); }
.project-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 52px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font: 600 .74rem/1.3 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  list-style: none;
}
.details-icon { position: relative; flex: none; width: 28px; height: 28px; border: 1px solid var(--line-strong); border-radius: 50%; transition: border-color .2s ease; }
.details-icon::before,
.details-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 1.5px;
  margin: -.75px 0 0 -5px;
  border-radius: 1px;
  background: var(--accent);
  transition: transform .3s var(--ease-out);
}
.details-icon::after { transform: rotate(90deg); }
.project-details[open] .details-icon::after { transform: rotate(0deg); }
.project-details .hl-list { grid-template-columns: minmax(0, 1fr); padding-bottom: .5rem; }

.project-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: auto; padding-top: .5rem; }
.project-note { display: inline-flex; align-items: baseline; gap: .5rem; color: var(--text-dim); font-size: .94rem; }
.project-note-check { color: var(--ok); font-weight: 700; }

/* Abstract, CSS-only headers tinted by --agent (decorative). */
.pv {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 16 / 7;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(85% 95% at 88% 8%, color-mix(in srgb, var(--agent) 24%, transparent), transparent 62%),
    radial-gradient(70% 80% at 6% 100%, color-mix(in srgb, var(--agent) 10%, transparent), transparent 60%),
    var(--term-bg);
}
.pv-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 62% 45%, #000 15%, transparent 78%);
  mask-image: radial-gradient(ellipse 70% 80% at 62% 45%, #000 15%, transparent 78%);
}
.pv-index { position: absolute; top: 1.1rem; left: 1.25rem; z-index: 3; color: var(--text); }
.pv-index > span { color: var(--muted); }

.pv-orbit {
  position: absolute;
  top: 50%;
  left: 54%;
  width: 72%;
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--agent) 32%, transparent);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotateX(68deg) rotateZ(-18deg);
}
.pv-orbit::after {
  content: '';
  position: absolute;
  inset: 16%;
  border: 1px dashed color-mix(in srgb, var(--agent) 26%, transparent);
  border-radius: 50%;
}
.pv-orbit-small { width: 40%; }

.pv-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26%;
  aspect-ratio: 5 / 7;
  border-radius: 12px;
  box-shadow: 0 30px 50px -22px rgba(0,0,0,.8);
}
.pv-card-back {
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--agent) 45%, transparent);
  background: linear-gradient(160deg, #2a2f3b, #1d212a);
  transform: translate(-108%, -48%) rotate(-13deg);
}
.pv-card-back::before {
  content: '';
  position: absolute;
  inset: 9%;
  border: 1px solid color-mix(in srgb, var(--agent) 22%, transparent);
  border-radius: 50%;
}
.pv-card-star { color: var(--agent); font-size: clamp(2rem, 4.2vw, 3.6rem); line-height: 1; text-shadow: 0 0 24px color-mix(in srgb, var(--agent) 60%, transparent); }
.pv-card-front {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.7);
  background: linear-gradient(165deg, #f6f4ee, #e7e3d8);
  transform: translate(-22%, -54%) rotate(8deg);
}
.pv-card-ring {
  position: absolute;
  inset: 13% 15% auto;
  aspect-ratio: 1;
  border: 1.5px solid color-mix(in srgb, var(--agent) 75%, #1b1f27);
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--agent) 16%, transparent), transparent 70%);
}
.pv-card-ring::before,
.pv-card-ring::after { content: ''; position: absolute; border-radius: 50%; }
.pv-card-ring::before { inset: 19%; border: 1.5px solid color-mix(in srgb, var(--agent) 45%, transparent); }
.pv-card-ring::after {
  inset: 39%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--agent) 70%, #fff), var(--agent));
  box-shadow: 0 0 18px color-mix(in srgb, var(--agent) 70%, transparent);
}
.pv-scan {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 41%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--agent) 25%, var(--agent) 75%, transparent);
  box-shadow: 0 0 14px 1px color-mix(in srgb, var(--agent) 70%, transparent);
}
.pv-card-front::before {
  content: '';
  position: absolute;
  inset: 7% 8% auto;
  aspect-ratio: 1;
  background:
    linear-gradient(var(--agent), var(--agent)) top left / 14% 2px no-repeat,
    linear-gradient(var(--agent), var(--agent)) top left / 2px 14% no-repeat,
    linear-gradient(var(--agent), var(--agent)) top right / 14% 2px no-repeat,
    linear-gradient(var(--agent), var(--agent)) top right / 2px 14% no-repeat,
    linear-gradient(var(--agent), var(--agent)) bottom left / 14% 2px no-repeat,
    linear-gradient(var(--agent), var(--agent)) bottom left / 2px 14% no-repeat,
    linear-gradient(var(--agent), var(--agent)) bottom right / 14% 2px no-repeat,
    linear-gradient(var(--agent), var(--agent)) bottom right / 2px 14% no-repeat;
  opacity: .8;
}
.pv-card-bars { position: absolute; left: 12%; right: 12%; bottom: 11%; display: grid; gap: 6px; }
.pv-card-bars > i { display: block; height: 5px; border-radius: 3px; background: rgba(27,31,39,.18); }
.pv-card-bars > i:nth-child(2) { width: 72%; }
.pv-card-bars > i:nth-child(3) { width: 44%; background: color-mix(in srgb, var(--agent) 70%, #1b1f27); }
.pv-phone {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12%;
  aspect-ratio: 9 / 18;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transform: translate(150%, -18%) rotate(4deg);
  box-shadow: 0 20px 40px -18px rgba(0,0,0,.8);
}
.pv-phone > i { position: absolute; top: 7%; left: 50%; width: 26%; height: 3px; margin-left: -13%; border-radius: 2px; background: rgba(255,255,255,.35); }
.pv-phone::after {
  content: '';
  position: absolute;
  inset: 22% 16% 34%;
  border-radius: 6px;
  background: color-mix(in srgb, var(--agent) 55%, transparent);
}

.pv-window {
  position: absolute;
  top: 19%;
  left: 13%;
  width: 60%;
  height: 70%;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  background: linear-gradient(180deg, #1b1f27, #14171d);
  box-shadow: 0 30px 60px -24px rgba(0,0,0,.85);
}
.pv-window-bar { display: flex; gap: 5px; height: 14%; padding: 0 5%; align-items: center; border-bottom: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03); }
.pv-window-bar > i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.18); }
.pv-window-bar > i:first-child { background: color-mix(in srgb, var(--agent) 75%, transparent); }
.pv-code { position: absolute; inset: 22% 7% 8% 18%; display: grid; align-content: start; gap: 9%; }
.pv-code::before { content: ''; position: absolute; top: 0; bottom: 0; left: -14%; width: 1px; background: rgba(255,255,255,.07); }
.pv-code > i { display: block; width: var(--w); height: 6px; border-radius: 3px; background: rgba(255,255,255,.14); }
.pv-code > i:nth-child(3n + 2) { margin-left: 10%; background: color-mix(in srgb, var(--agent) 60%, transparent); }
.pv-code > i:nth-child(4) { margin-left: 10%; background: rgba(127,212,139,.45); }
.pv-code > i:last-child { position: relative; }
.pv-code > i:last-child::after {
  content: '';
  position: absolute;
  top: -3px;
  right: -9px;
  width: 6px;
  height: 12px;
  border-radius: 1px;
  background: var(--accent);
  animation: report-caret 1.1s steps(1) infinite;
}
@keyframes report-caret { 50% { opacity: 0; } }

.pv-branches { position: absolute; top: 16%; right: 9%; width: 16%; height: 70%; }
.pv-branches::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 18%;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,.1));
}
.pv-branches > b {
  position: absolute;
  top: 22%;
  left: 18%;
  width: 52%;
  height: 50%;
  border: 2px solid var(--agent);
  border-left: 0;
  border-radius: 0 999px 999px 0;
  opacity: .9;
}
.pv-branches > i {
  position: absolute;
  left: 18%;
  z-index: 1;
  width: 12px;
  height: 12px;
  margin-left: -5px;
  border: 2px solid #f4f3ee;
  border-radius: 50%;
  background: var(--term-bg);
}
.pv-branches > i:nth-child(1) { top: 8%; }
.pv-branches > i:nth-child(2) { top: 42%; left: 70%; border-color: var(--agent); background: var(--agent); box-shadow: 0 0 16px var(--agent); }
.pv-branches > i:nth-child(3) { top: 86%; }

/* Recorded demo (Trainmymat): the desktop app in a browser window, the mobile app in a phone over its corner. */
.pv-demo { aspect-ratio: 16 / 11.5; }
.demo-stage { position: absolute; inset: 0; }
.demo-browser,
.demo-phone {
  position: absolute;
  top: 50%;
  overflow: hidden;
  background: #07080c;
  box-shadow: 0 34px 70px -26px rgba(0,0,0,.9);
}
.demo-browser {
  left: 5%;
  width: 74%;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  transform: translateY(-52%);
}
.demo-bar { display: flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-bottom: 1px solid rgba(255,255,255,.08); background: #12151c; }
.demo-bar > i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.18); }
.demo-bar > i:first-child { background: color-mix(in srgb, var(--agent) 75%, transparent); }
.demo-url {
  flex: 1;
  min-width: 0;
  margin: 0 12% 0 6%;
  padding: 2px 8px;
  overflow: hidden;
  border-radius: 5px;
  background: rgba(255,255,255,.06);
  color: var(--muted);
  font-size: .64rem;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.demo-video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: #07080c; }
/* The status bar (with its island) sits above the recording, so nothing of the app hides behind it. */
.demo-phone {
  right: 5%;
  width: 23%;
  padding: 16px 5px 5px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 24px;
  transform: translateY(-36%) rotate(2deg);
}
.demo-phone::before { content: ''; position: absolute; top: 5px; left: 50%; width: 30%; height: 7px; margin-left: -15%; border-radius: 7px; background: #000; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.demo-phone .demo-video { aspect-ratio: 450 / 974; border-radius: 0 0 19px 19px; }

.demo-toggle {
  position: absolute;
  left: 1.1rem;
  bottom: 1rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 34px;
  padding: 0 .85rem 0 .7rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(10,12,16,.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--text);
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease;
}
.demo-toggle[hidden] { display: none; }
/* Play triangle by default, two pause bars while the videos play. */
.demo-icon { width: 9px; height: 10px; background: var(--accent); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.demo-toggle[data-state="playing"] .demo-icon { clip-path: polygon(0 0, 35% 0, 35% 100%, 0 100%, 0 0, 65% 0, 100% 0, 100% 100%, 65% 100%, 65% 0); }

/* Wide screens: the visual beside the text, alternating sides; the visual fills the card's height. */
@media (min-width: 1024px) {
  .project-card { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); }
  .project:nth-child(even) .project-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); }
  .project-card > .pv { aspect-ratio: auto; min-height: 34rem; border-bottom: 0; border-right: 1px solid var(--line); }
  .project:nth-child(even) .project-card > .pv { order: 1; border-right: 0; border-left: 1px solid var(--line); }
  .demo-browser { left: 4%; width: 88%; transform: translateY(-60%); }
  .demo-phone { right: 3%; width: 28%; transform: translateY(-26%) rotate(2deg); }
  .pv-codev .pv-window { top: 50%; left: 9%; width: 68%; height: auto; aspect-ratio: 1.4; transform: translateY(-50%); }
  .pv-codev .pv-branches { top: 50%; height: 48%; transform: translateY(-50%); }
}

/* ---------- Formation ---------- */

.edu-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: clamp(.75rem, 1.4vw, 1rem); }
.edu-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.75rem, 1.4vw, 1rem); }
.edu,
.edu-langs {
  display: grid;
  align-content: start;
  gap: .6rem;
  padding: clamp(1.4rem, 1rem + 1.4vw, 2.1rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
}
.edu-period {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 520;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  letter-spacing: -.04em;
}
.edu-degree { margin-top: .6rem; font-size: var(--step-2); font-weight: 620; letter-spacing: -.028em; }
.edu-school { color: var(--text-dim); }
.edu-langs { background: linear-gradient(180deg, color-mix(in srgb, var(--agent) 7%, transparent), rgba(255,255,255,.01)); }
.edu-langs-title { color: var(--agent); }
.lang-list { display: grid; gap: 1rem; }
.lang { display: grid; justify-items: start; gap: .35rem; }
.lang-name { font-size: var(--step-2); font-weight: 620; letter-spacing: -.028em; }
.lang-level { color: var(--text-dim); }
.lang-detail {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-top: .35rem;
  padding: .35rem .7rem;
  border: 1px solid rgba(255,229,46,.3);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text);
}
.lang-check { color: var(--accent); }

/* ---------- Qualités ---------- */

.quality-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.75rem, 1.4vw, 1rem); }
.quality {
  display: grid;
  align-content: start;
  gap: .8rem;
  padding: clamp(1.4rem, 1rem + 1.2vw, 1.9rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
}
.quality-num { color: var(--agent); }
.quality-name {
  color: var(--text);
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 1.25rem + 1.3vw, 2.5rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.02em;
}
.quality-proof { color: var(--text-dim); font-size: .95rem; line-height: 1.6; }

/* ---------- Contact ---------- */

.report-contact {
  overflow: hidden;
  border-top: 1px solid var(--line);
  padding-bottom: clamp(5rem, 3rem + 7vw, 10rem);
}
.contact-glow {
  position: absolute;
  inset: auto -10% -45% -10%;
  height: 90%;
  background: radial-gradient(45% 50% at 50% 50%, rgba(255,229,46,.09), transparent 72%);
  pointer-events: none;
}
.contact-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem 3rem;
}
.contact-team {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: clamp(.2rem, .6vw, .55rem);
  margin-bottom: clamp(.5rem, 1.6vw, 1.5rem);
  padding: 0 .5rem .65rem;
}
.contact-team::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 18%, var(--line-strong) 82%, transparent);
}
.contact-team .agent-avatar { width: clamp(36px, 3.6vw, 52px); }
.contact-team .agent-avatar > svg { width: 100%; height: auto; }
.contact-kicker { display: inline-flex; align-items: center; gap: .55rem; color: var(--accent); }
.contact-check { color: var(--ok); }
.report-contact .section-title { margin-top: 1rem; font-size: clamp(3.1rem, 1.3rem + 7.4vw, 9rem); line-height: .96; letter-spacing: -.055em; }
.contact-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  align-items: start;
  gap: 2rem clamp(2rem, 6vw, 6rem);
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
  padding-top: clamp(2rem, 3.5vw, 3rem);
  border-top: 1px solid var(--line);
}
.contact-text { max-width: 30rem; color: var(--text-dim); font-size: var(--step-1); line-height: 1.6; }
.contact-actions { display: grid; justify-items: start; gap: clamp(1.5rem, 2.6vw, 2.25rem); container-type: inline-size; }
.contact-mail {
  display: inline-grid;
  grid-template-columns: minmax(0, auto) auto;
  align-items: end;
  column-gap: 1rem;
  row-gap: .5rem;
  max-width: 100%;
  border-radius: var(--radius-sm);
}
.contact-mail-label { grid-column: 1 / -1; color: var(--muted); }
.contact-mail-address {
  position: relative;
  min-width: 0;
  padding-bottom: .25rem;
  color: var(--text);
  font-family: var(--font-display);
  /* Sized to its column so the address (and the arrow) stay on one line. */
  font-size: clamp(1rem, 5.9cqi, 2.7rem);
  font-weight: 520;
  line-height: 1.15;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.contact-mail-address::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform-origin: left;
  transition: transform .35s var(--ease-out);
}
.contact-mail-arrow {
  display: grid;
  place-items: center;
  width: clamp(2.6rem, 2rem + 1.6vw, 3.4rem);
  aspect-ratio: 1;
  margin-bottom: .2rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: clamp(1.1rem, .9rem + .6vw, 1.45rem);
  transition: transform .3s var(--ease-out);
}
.contact-links { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Hover (pointer devices only) ---------- */

@media (hover: hover) {
  .reason, .skill, .ia-card, .edu, .edu-langs, .quality, .xp-card, .project-card {
    transition: border-color .25s ease, background-color .25s ease, translate .35s var(--ease-out);
  }
  :is(.reason, .skill, .ia-card, .edu, .quality, .xp-card):hover { border-color: var(--line-strong); background-color: var(--card-hover); }
  :is(.reason, .skill, .ia-card, .edu, .quality):hover { translate: 0 -3px; }
  .project-card:hover { border-color: var(--line-strong); }
  .found-agent:hover { border-color: color-mix(in srgb, var(--agent) 60%, transparent); background: color-mix(in srgb, var(--agent) 10%, transparent); }
  .tech:hover { border-color: color-mix(in srgb, var(--agent) 45%, transparent); background: color-mix(in srgb, var(--agent) 7%, transparent); }
  .project-details > summary:hover .details-icon { border-color: var(--accent); }
  .demo-toggle:hover { border-color: var(--accent); background-color: rgba(10,12,16,.88); }
  .hero-cue:hover { color: var(--text); }
  .contact-mail:hover .contact-mail-arrow { transform: translate(3px, -3px); }
  .contact-mail:hover .contact-mail-address::after { transform: scaleX(1.02); }
}

@media (pointer: coarse) {
  .found-agent { min-height: 44px; }
}

/* ---------- Reveal: armed by mountReport, revealed by IntersectionObserver / deliver() ---------- */

.report.is-armed [data-reveal] {
  --reveal-delay: calc(var(--i, 0) * var(--stagger, 70ms));
  transition:
    opacity .45s var(--ease-out) var(--reveal-delay),
    transform .9s var(--ease-out) var(--reveal-delay),
    translate .35s var(--ease-out),
    border-color .25s ease,
    background-color .25s ease;
}
.report.is-armed [data-reveal]:not(.is-in) { opacity: 0; transform: translate3d(0, 1.6rem, 0); }
.report.is-armed [data-reveal="card"]:not(.is-in) { transform: translate3d(0, 2.2rem, 0) scale(.985); }
.report.is-armed [data-reveal="byline"]:not(.is-in) { transform: translate3d(0, .75rem, 0); }

/* Titles: no fade, each line rises out of a mask placed at its own baseline. */
.report.is-armed [data-reveal="title"]:not(.is-in) { opacity: 1; transform: none; }
.report.is-armed .title-line { clip-path: inset(-1em -1em 0 -1em); }
.report.is-armed [data-reveal="title"] .title-line > * {
  transition: transform 1s var(--ease-out);
  transition-delay: calc(var(--i, 0) * var(--stagger, 70ms));
}
.report.is-armed [data-reveal="title"] .title-line + .title-line > * {
  transition-delay: calc(var(--i, 0) * var(--stagger, 70ms) + 120ms);
}
/* 100% + .55em: the glyphs overhang tight line boxes, so they must clear the padded mask edge entirely. */
.report.is-armed [data-reveal="title"]:not(.is-in) .title-line > * { transform: translate3d(0, calc(100% + .55em), 0); }

/* The agent "lands" on its byline: a drop and a small bounce (JS adds .is-landing once). */
.agent-avatar.is-landing {
  animation: report-land .95s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * var(--stagger, 70ms));
}
@keyframes report-land {
  0% { opacity: 0; transform: translate3d(0, -2.4rem, 0) scale(.86); }
  55% { opacity: 1; transform: translate3d(0, .2rem, 0) scale(1.05, .94); }
  78% { transform: translate3d(0, -.3rem, 0) scale(.98, 1.02); }
  100% { opacity: 1; transform: none; }
}

/* revealAll(): everything at once, without transitions. */
.report.is-instant [data-reveal],
.report.is-instant [data-reveal] .title-line > * { transition: none !important; }

/* Reduced motion: nothing waits to be revealed, nothing moves. */
.motion-reduced .report.is-armed [data-reveal],
.motion-reduced .report.is-armed [data-reveal] .title-line > * { opacity: 1; transform: none; transition: none; }
.motion-reduced .report .agent-avatar.is-landing,
.motion-reduced .report .hero-cue-track > i { animation: none; }

/* ---------- Responsive ---------- */

@media (max-width: 1179.98px) {
  .skill-grid,
  .quality-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reason-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reason,
  .reason:nth-child(n + 4) { grid-column: span 1; }
  .reason:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .timeline { --when: 10.5rem; --rail: 2.75rem; }
  .tech-group { grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); }
  .edu-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1023.98px) {
  .hl-list { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 899.98px) {
  .report-hero { min-height: 0; padding-top: clamp(1rem, 4vw, 1.75rem); }
  .contact-head { flex-direction: column-reverse; align-items: flex-start; }
  .contact-team { margin-bottom: 0; padding-inline: 0; }
  .contact-body { grid-template-columns: minmax(0, 1fr); }
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "id" "convo" "name" "role" "about" "actions";
    grid-template-rows: none;
  }
  .hero-convo { justify-self: start; width: min(100%, 34rem); margin-bottom: clamp(1.75rem, 5vw, 2.5rem); }
  .hero-name { font-size: clamp(3.4rem, 16vw, 6.5rem); }
  .hero-foot { padding-top: 2.25rem; }

  .verdict-qa { grid-template-columns: minmax(0, 1fr); }
  .verdict-question { max-width: 36rem; }

  .metrics { grid-template-columns: minmax(0, 1fr); }
  .metric,
  .metric + .metric {
    grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr);
    align-items: baseline;
    gap: 1rem;
    padding: 1.1rem 0;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }
  .metric-value { font-size: clamp(2.3rem, 1.6rem + 3vw, 3.2rem); }
  .metric-label { max-width: none; }

  .timeline { --rail: 1.75rem; }
  .timeline::before { left: calc(var(--rail) / 2); top: .6rem; }
  .xp { grid-template-columns: var(--rail) minmax(0, 1fr); }
  .xp-when { grid-column: 2; grid-row: 1; display: flex; flex-wrap: wrap; align-items: center; justify-items: start; gap: .5rem .75rem; padding: 0 0 .85rem; text-align: left; }
  .xp-node { grid-column: 1; grid-row: 1; margin-top: .3rem; }
  .xp-card { grid-column: 2; }

  .tech-group { grid-template-columns: minmax(0, 1fr); gap: .9rem; }
  .tech-group-name { padding-top: 0; }
  .ia-quote { grid-template-columns: minmax(0, 1fr); }
  .ia-quote-mark { margin-top: 0; }
  .ia-quote-by { grid-column: 1; }
}

@media (max-width: 719.98px) {
  .ia-grid,
  .edu-list { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 599.98px) {
  .skill-grid,
  .quality-grid,
  .reason-list { grid-template-columns: minmax(0, 1fr); }
  .reason:last-child:nth-child(odd) { grid-column: auto; }
  .hero-id { gap: .85rem; }
  .hero-actions > .btn,
  .verdict-actions > .btn { flex: 1 1 auto; }
  .convo-bar { padding: 0 1rem 0 4.4rem; justify-content: flex-start; }
  .convo-body { padding: .9rem .9rem 1rem; gap: .75rem; font-size: .78rem; }
  .convo-prompt { padding: .6rem .7rem; }
  .convo-answer { padding-inline: .7rem; }
  .convo-stats { padding-inline: calc(.7rem + 2.15ch) .7rem; font-size: .72rem; }
  .convo-team { padding: .7rem .7rem 0; gap: .2rem; }
  .convo-team .agent-avatar { width: 24px; height: 27px; }
  .byline-index { display: none; }
  .project-meta { flex-direction: column; }
  .pv { aspect-ratio: 16 / 9.5; }
  .pv-demo { aspect-ratio: 16 / 13; }
  .demo-browser { transform: translateY(-58%); }
  .demo-phone { transform: translateY(-42%) rotate(2deg); }
  .demo-toggle { left: .75rem; bottom: .65rem; min-height: 30px; padding: 0 .7rem 0 .6rem; font-size: .62rem; }
  .demo-bar { height: 18px; padding: 0 7px; gap: 4px; }
  .demo-bar > i { width: 5px; height: 5px; }
  .demo-url { font-size: .54rem; padding: 1px 6px; }
  .demo-phone { padding: 11px 3px 3px; border-radius: 16px; }
  .demo-phone::before { top: 3px; height: 5px; }
  .demo-phone .demo-video { border-radius: 0 0 13px 13px; }
  .contact-links { display: grid; width: 100%; }
  .contact-links > .btn { width: 100%; }
  .contact-mail { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) auto; row-gap: .35rem; }
  .contact-mail-label { grid-column: 1; align-self: center; }
  .contact-mail-arrow { grid-row: 1; grid-column: 2; width: 2.5rem; margin: 0; }
  .contact-mail-address { grid-column: 1 / -1; justify-self: start; font-size: clamp(1rem, 6.8cqi, 1.9rem); }
}

/* Print (base.css switches the palette): never leave a title line masked or a robot mid-air. */
@media print {
  .report .title-line { clip-path: none !important; }
  .report .title-line > *,
  .report .agent-avatar { transform: none !important; animation: none !important; }
  .report-hero { min-height: 0; }
}
