:root {
  --paper: #F1F1EC;
  --paper-2: #E9E9E2;
  --ink: #14161B;
  --graphite: #5B606B;
  --line: #D9D9D1;
  --accent: #2833D8;
  --accent-soft: rgba(40, 51, 216, .1);
  --card: #FBFBF8;
  /* precomputed alpha/blend colors (replace color-mix() for wider validator support) */
  --mix-accent-52: rgba(40, 51, 216, .52);
  --mix-accent-38: rgba(40, 51, 216, .38);
  --mix-accent-30: rgba(40, 51, 216, .3);
  --mix-accent-blend: rgb(77, 87, 234);
  --mix-card-55: rgba(251, 251, 248, .55);
  --mix-card-35: rgba(251, 251, 248, .35);
  --mix-paper-94: rgba(241, 241, 236, .94);
  --mix-paper-85: rgba(241, 241, 236, .85);
  --shadow: 0 1px 2px rgba(20, 22, 27, .04), 0 12px 34px -18px rgba(20, 22, 27, .22);

  --f-display: "Bricolage Grotesque", system-ui, sans-serif;
  --f-body: "Hanken Grotesk", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  --maxw: 1120px;
  --rail: 250px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

[data-theme="dark"] {
  --paper: #101117;
  --paper-2: #171922;
  --ink: #ECECE4;
  --graphite: #9BA0AB;
  --line: #282A34;
  --accent: #7A82FF;
  --accent-soft: rgba(122, 130, 255, .12);
  --card: #171922;
  --mix-accent-52: rgba(122, 130, 255, .52);
  --mix-accent-38: rgba(122, 130, 255, .38);
  --mix-accent-30: rgba(122, 130, 255, .3);
  --mix-accent-blend: rgb(122, 130, 255);
  --mix-card-55: rgba(23, 25, 34, .55);
  --mix-card-35: rgba(23, 25, 34, .35);
  --mix-paper-94: rgba(16, 17, 23, .94);
  --mix-paper-85: rgba(16, 17, 23, .85);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px -20px rgba(0, 0, 0, .6);
}

* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .5s var(--ease), color .5s var(--ease);
}

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

img {
  max-width: 100%
}

::selection {
  background: var(--accent);
  color: #fff
}

/* faint paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .4;
  background-image: radial-gradient(var(--line) .5px, transparent .5px);
  background-size: 22px 22px;
  mix-blend-mode: multiply;
}

[data-theme="dark"] body::before {
  mix-blend-mode: screen;
  opacity: .15
}

/* ---------- scroll progress ---------- */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  z-index: 60;
  transition: width .1s linear
}

/* ---------- layout shell ---------- */
.shell {
  max-width: calc(var(--maxw) + var(--rail));
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--rail) 1fr;
  position: relative;
  z-index: 2
}

/* ---------- side rail nav ---------- */
.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 38px 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--line)
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px
}

.mark {
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--ink);
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 19px;
  position: relative;
  overflow: hidden
}

.mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateY(101%);
  transition: transform .5s var(--ease)
}

.mark:hover::after {
  transform: translateY(0)
}

.mark span {
  position: relative;
  z-index: 2;
  transition: color .4s var(--ease)
}

.mark:hover span {
  color: #fff
}

.brand b {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.01em;
  line-height: 1.15
}

.brand small {
  display: block;
  font-family: var(--f-mono);
  font-size: 10.5px;
  color: var(--graphite);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-top: 3px
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 34px 0
}

.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  font-size: 14px;
  color: var(--graphite);
  transition: color .3s var(--ease)
}

.nav a .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line);
  transition: all .3s var(--ease)
}

.nav a .idx {
  font-family: var(--f-mono);
  font-size: 10px;
  opacity: .6;
  width: 16px
}

.nav a:hover {
  color: var(--ink)
}

.nav a.active {
  color: var(--ink);
  font-weight: 600
}

.nav a.active .dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  transform: scale(1.15)
}

.rail-foot {
  display: flex;
  flex-direction: column;
  gap: 12px
}

.rail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  align-self: flex-start;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: transparent;
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .3s, transform .3s var(--ease)
}

/* icon-only variant (theme toggle) — distinct from the primary action */
.theme-btn.icon {
  gap: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  justify-content: center;
  border-radius: 10px
}

.theme-btn:hover {
  border-color: var(--accent);
  transform: translateY(-1px)
}

.theme-btn svg {
  width: 15px;
  height: 15px
}

/* theme icon by state: moon in light (→ dark), sun in dark (→ light) */
.icon-sun {
  display: none
}

[data-theme="dark"] .icon-moon {
  display: none
}

[data-theme="dark"] .icon-sun {
  display: block
}

/* calm presence dot: soft static halo, no permanent animation */
.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #17915e;
  box-shadow: 0 0 0 3px rgba(23, 145, 94, .18)
}

/* ---------- content column ---------- */
.main {
  min-width: 0;
  padding: 0 clamp(24px, 5vw, 72px)
}

section {
  padding: 50px 0;
  border-top: 1px solid transparent
}

section+section {
  border-top: 1px solid var(--line)
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 26px
}

.eyebrow::before {
  content: attr(data-n);
  color: var(--graphite)
}

.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line)
}

h2 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(28px, 3.6vw, 40px);
  letter-spacing: -.02em;
  line-height: 1.05;
  margin: 0 0 22px
}

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 38px 0 70px;
  border-top: none
}

.ribbon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--card);
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--graphite);
  align-self: flex-start;
  margin-bottom: 30px;
  box-shadow: var(--shadow)
}

.ribbon b {
  color: var(--ink);
  font-weight: 600
}

.hero h1 {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(44px, 7.2vw, 92px);
  line-height: .96;
  letter-spacing: -.035em;
  margin: 0 0 8px
}

.hero h1 .g {
  color: var(--accent);
  font-style: italic;
  font-weight: 700
}

.hero .lede {
  font-size: clamp(17px, 2vw, 21px);
  color: var(--graphite);
  max-width: 50ch;
  margin: 24px 0 0;
  line-height: 1.5
}

.hero .lede b {
  color: var(--ink);
  font-weight: 600
}

/* AI orb — morphing "mesh" gradient (100% CSS, lightweight, theme-aware) */
.hero-orb {
  position: relative;
  margin: 4px 0 34px;
  padding: clamp(24px, 4.4vw, 56px);
  border: 1px solid var(--line);
  border-radius: clamp(20px, 2.4vw, 30px);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
}

/* content layer — above the blobs and grain */
.hero-orb-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-orb-content h1 {
  margin-bottom: 0;
}

.hero-orb .blob {
  position: absolute;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(58px);
  mix-blend-mode: multiply;
  will-change: transform;
}

[data-theme="dark"] .hero-orb .blob {
  mix-blend-mode: screen;
  filter: blur(74px);
}

.hero-orb .b1 {
  width: 52%;
  left: 2%;
  top: -28%;
  background: radial-gradient(circle at 50% 50%, var(--mix-accent-52), transparent 66%);
  animation: orb1 22s var(--ease) infinite alternate;
}

.hero-orb .b2 {
  width: 46%;
  right: 2%;
  top: 6%;
  background: radial-gradient(circle at 50% 50%, var(--mix-accent-38), transparent 64%);
  animation: orb2 28s var(--ease) infinite alternate;
}

.hero-orb .b3 {
  width: 62%;
  left: 24%;
  bottom: -40%;
  background: radial-gradient(circle at 50% 50%, var(--mix-accent-30), transparent 62%);
  animation: orb3 34s var(--ease) infinite alternate;
}

/* edge fade into the panel */
.hero-orb::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, var(--mix-card-55), transparent 26%, transparent 74%, var(--mix-card-55)),
    linear-gradient(90deg, var(--mix-card-35), transparent 14%, transparent 86%, var(--mix-card-35));
}

/* fine grain (reused from body::before) */
.hero-orb::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image: radial-gradient(var(--line) .5px, transparent .5px);
  background-size: 14px 14px;
  opacity: .35;
  mix-blend-mode: multiply;
}

[data-theme="dark"] .hero-orb::after {
  mix-blend-mode: screen;
  opacity: .12;
}

@keyframes orb1 {
  from {
    transform: translate(0, 0) scale(1);
  }

  to {
    transform: translate(14%, 20%) scale(1.18);
  }
}

@keyframes orb2 {
  from {
    transform: translate(0, 0) scale(1);
  }

  to {
    transform: translate(-16%, 12%) scale(1.12);
  }
}

@keyframes orb3 {
  from {
    transform: translate(0, 0) scale(1.05);
  }

  to {
    transform: translate(10%, -14%) scale(1.22);
  }
}

/* signature — living signal band */
.signal-wrap {
  margin: 44px 0 40px;
  position: relative
}

.signal-wrap .labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--f-mono);
  font-size: 10.5px;
  color: var(--graphite);
  letter-spacing: .04em;
  margin-bottom: 8px
}

#signal {
  display: block;
  width: 100%;
  height: 96px
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 13.5px;
  background: var(--card);
  transition: transform .35s var(--ease), border-color .35s
}

.chip svg {
  width: 15px;
  height: 15px;
  color: var(--accent)
}

.chip:hover {
  transform: translateY(-2px);
  border-color: var(--accent)
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid var(--ink);
  transition: transform .3s var(--ease), background .3s, color .3s, border-color .3s;
  will-change: transform
}

.btn svg {
  width: 17px;
  height: 17px
}

.btn.primary {
  background: var(--ink);
  color: var(--paper)
}

.btn.primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px)
}

.btn.ghost {
  background: transparent
}

.btn.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px)
}

/* ---------- profile ---------- */
.lead-para {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(21px, 2.6vw, 30px);
  line-height: 1.32;
  letter-spacing: -.015em;
  max-width: 24ch
}

.lead-para em {
  color: var(--accent);
  font-style: normal
}

.profil-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 56px;
  align-items: start
}

.facts {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line)
}

.fact {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px
}

.fact span {
  color: var(--graphite);
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: .03em;
  text-transform: uppercase
}

.fact b {
  font-weight: 600;
  text-align: right
}

/* "Disponibilité" value: presence dot + label aligned right */
.fact b.avail-fact {
  display: inline-flex;
  align-items: center;
  gap: 8px
}

/* ---------- expertise clusters ---------- */
.clusters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px
}

.cluster {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  overflow: hidden;
  transition: transform .45s var(--ease), border-color .45s, box-shadow .45s
}

.cluster:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow)
}

.cluster .num {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: .1em
}

.cluster h3 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -.01em;
  margin: 14px 0 12px
}

.cluster p {
  font-size: 14.5px;
  color: var(--graphite);
  margin: 0 0 18px;
  line-height: 1.55
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px
}

.tag {
  font-size: 12.5px;
  padding: 5px 11px;
  border-radius: 8px;
  background: var(--paper-2);
  color: var(--ink);
  border: 1px solid transparent;
  transition: background .3s, border-color .3s
}

.cluster:hover .tag {
  border-color: var(--line)
}

.cluster .glow {
  position: absolute;
  top: -40%;
  right: -30%;
  width: 60%;
  height: 120%;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
  opacity: 0;
  transition: opacity .5s
}

.cluster:hover .glow {
  opacity: 1
}

/* ---------- skills bars ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 64px
}

.skill-col h3 {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--graphite);
  margin: 0 0 22px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line)
}

.skill {
  margin-bottom: 20px
}

.skill .top {
  display: flex;
  justify-content: space-between;
  font-size: 14.5px;
  margin-bottom: 8px
}

.skill .top b {
  font-weight: 600
}

.skill .top i {
  font-style: normal;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--graphite)
}

.bar {
  height: 5px;
  background: var(--paper-2);
  border-radius: 99px;
  overflow: hidden
}

.bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--mix-accent-blend));
  border-radius: 99px;
  transition: width 1.1s var(--ease)
}

/* ---------- timeline ---------- */
.timeline {
  position: relative;
  margin-left: 6px
}

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 10px;
  width: 1px;
  background: var(--line)
}

.tl {
  position: relative;
  padding: 0 0 42px 42px
}

.tl:last-child {
  padding-bottom: 0
}

.tl .node {
  position: absolute;
  left: 0;
  top: 4px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--accent);
  z-index: 2;
  transition: transform .4s var(--ease), background .4s
}

.tl:hover .node {
  background: var(--accent);
  transform: scale(1.25)
}

.tl .when {
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--accent);
  letter-spacing: .03em
}

.tl h3 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 19px;
  margin: 8px 0 3px;
  letter-spacing: -.01em
}

.tl .org {
  font-size: 14px;
  color: var(--graphite);
  margin-bottom: 12px
}

.tl ul {
  margin: 0;
  padding-left: 18px;
  color: var(--graphite);
  font-size: 14.5px
}

.tl ul li {
  margin-bottom: 5px
}

.tl ul li::marker {
  color: var(--accent)
}

/* ---------- projects ---------- */
.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px
}

.proj {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px;
  transition: transform .45s var(--ease), border-color .45s, box-shadow .45s
}

.proj:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow)
}

.proj .kind {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--graphite);
  display: flex;
  justify-content: space-between;
  align-items: center
}

.proj .kind .arrow {
  transition: transform .4s var(--ease);
  color: var(--accent)
}

.proj:hover .kind .arrow {
  transform: translate(3px, -3px)
}

.proj h3 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 21px;
  margin: 16px 0 10px;
  letter-spacing: -.01em
}

.proj p {
  font-size: 14.5px;
  color: var(--graphite);
  margin: 0 0 16px;
  line-height: 1.55
}

.proj .stack {
  display: flex;
  flex-wrap: wrap;
  gap: 7px
}

/* ---------- fit ---------- */
.fit-intro {
  max-width: 52ch;
  color: var(--graphite);
  margin: 0 0 40px;
  font-size: 17px
}

.fit-intro b {
  color: var(--ink)
}

.fit {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px
}

.fit-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px;
  background: var(--card);
  transition: transform .45s var(--ease), border-color .45s
}

.fit-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent)
}

.fit-card .icn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  margin-bottom: 18px
}

.fit-card .icn svg {
  width: 22px;
  height: 22px;
  color: var(--accent)
}

.fit-card h3 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 17px;
  margin: 0 0 10px;
  line-height: 1.25
}

.fit-card p {
  font-size: 14px;
  color: var(--graphite);
  margin: 0;
  line-height: 1.55
}

/* ---------- education ---------- */
.edu {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 64px
}

.edu .row {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px
}

.edu .row .when {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--accent)
}

.edu .row b {
  font-weight: 600;
  font-size: 15.5px
}

.edu .row span {
  color: var(--graphite);
  font-size: 14px
}

/* ---------- contact ---------- */
.contact {
  padding-bottom: 38px
}

.contact h2 {
  font-size: clamp(34px, 5.5vw, 64px)
}

.contact .big-mail {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(22px, 3.4vw, 38px);
  letter-spacing: -.02em;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0 34px;
  cursor: pointer;
  transition: color .3s
}

.contact .big-mail:hover {
  color: var(--accent)
}

.contact .big-mail svg {
  width: .7em;
  height: .7em;
  opacity: .5;
  transition: transform .35s var(--ease), opacity .3s
}

.contact .big-mail:hover svg {
  transform: translate(4px, -4px);
  opacity: 1
}

.contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px
}

.cbtn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14.5px;
  cursor: pointer;
  background: var(--card);
  transition: transform .3s var(--ease), border-color .3s, color .3s
}

.cbtn svg {
  width: 17px;
  height: 17px;
  color: var(--accent)
}

.cbtn:hover {
  transform: translateY(-2px);
  border-color: var(--accent)
}

/* reset when .big-mail / .cbtn are <button> elements (keyboard accessibility) */
button.big-mail,
button.cbtn {
  font-family: inherit;
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
}

button.big-mail {
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
}

footer {
  grid-column: 2;
  border-top: 1px solid var(--line);
  padding: 30px clamp(24px, 5vw, 72px) 0;
  margin-top: 70px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--graphite)
}

/* ---------- validation / compliance badges ---------- */
.badges {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--card);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .01em;
  color: var(--graphite);
  white-space: nowrap;
}

.badge b {
  color: var(--ink);
  font-weight: 600;
}

.badge svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

a.badge {
  transition: transform .3s var(--ease), border-color .3s, color .3s;
}

a.badge:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--ink);
}

/* print-only header: hidden on screen */
.print-head {
  display: none;
}

/* placeholder styling — easy spotting of fields to fill in */
.ph {
  background: var(--accent-soft);
  border-bottom: 1px dashed var(--accent);
  border-radius: 3px;
  padding: 0 3px;
  font-style: normal
}

/* toast */
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translate(-50%, 16px);
  opacity: 0;
  visibility: hidden;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 20px;
  border-radius: 11px;
  font-size: 13.5px;
  z-index: 80;
  box-shadow: var(--shadow);
  transition: transform .45s var(--ease), opacity .45s var(--ease), visibility .45s var(--ease);
  display: flex;
  align-items: center;
  gap: 9px
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible
}

.toast svg {
  width: 16px;
  height: 16px;
  color: #5fe0a8
}

/* reveal */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s var(--ease), transform .8s var(--ease)
}

.reveal.in {
  opacity: 1;
  transform: none
}

/* keyboard safety: a focused block is always visible (WCAG 2.4.7) */
.reveal:focus-within {
  opacity: 1;
  transform: none
}

/* mobile top bar (hidden desktop) */
.topbar {
  display: none
}

/* ---------- mobile menu (hamburger) ---------- */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .3s, transform .3s var(--ease);
}

.menu-btn:hover {
  border-color: var(--accent);
}

.menu-btn svg {
  width: 18px;
  height: 18px;
}

.mobile-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  background: var(--mix-paper-94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 15px;
  color: var(--ink);
  transition: background .25s;
}

.mobile-nav a .idx {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--graphite);
  width: 18px;
}

.mobile-nav a:hover,
.mobile-nav a:focus-visible {
  background: var(--accent-soft);
}

/* ============ RESPONSIVE ============ */
@media (max-width:940px) {
  .shell {
    grid-template-columns: 1fr
  }

  .rail {
    display: none
  }

  .topbar {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 50;
    justify-content: space-between;
    align-items: center;
    padding: 14px clamp(20px, 5vw, 40px);
    background: var(--mix-paper-85);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line)
  }

  .main {
    padding: 0 clamp(20px, 6vw, 44px)
  }

  footer {
    grid-column: 1;
    padding-left: clamp(20px, 6vw, 44px);
    padding-right: clamp(20px, 6vw, 44px)
  }

  .hero {
    min-height: auto;
    padding: 60px 0 60px
  }

  .profil-grid {
    grid-template-columns: 1fr;
    gap: 36px
  }

  .clusters,
  .projects,
  .fit,
  .skills-grid,
  .edu {
    grid-template-columns: 1fr
  }

  .skills-grid {
    gap: 36px
  }

  section {
    padding: 70px 0
  }
}

@media (max-width:520px) {
  body {
    font-size: 16px
  }

  .hero h1 {
    font-size: clamp(38px, 12vw, 60px)
  }

  .cta-row .btn {
    flex: 1;
    justify-content: center
  }
}

@media (prefers-reduced-motion:reduce) {
  * {
    transition: none !important;
    animation: none !important
  }

  .reveal {
    opacity: 1;
    transform: none
  }
}

/* accessible heading hidden visually (screen readers only) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* skip link (RGAA 12.7) — visible on keyboard focus */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--paper);
  font-family: var(--f-mono);
  font-size: 13px;
  transition: top .2s var(--ease);
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px
}

/* ============================================================
   PRINTABLE VERSION — A4 / PDF export (Ctrl+P)
   Reuses the on-screen HTML, restyled: paper palette,
   single column, decoration & interactive elements hidden, ~1–2 pages.
   ============================================================ */
@media print {

  /* --- print palette: force white paper / black ink,
         including from dark mode (the var() values adapt) --- */
  :root,
  :root[data-theme="dark"] {
    --paper: #fff;
    --paper-2: #fff;
    --card: #fff;
    --ink: #000;
    --graphite: #3a3a3a;
    --line: #c9c9c9;
    --accent: #1a24c4;
    --accent-soft: #1a24c41a;
    --shadow: none;
  }

  @page {
    size: A4;
    margin: 14mm;
  }

  html {
    scroll-behavior: auto;
  }

  body {
    background: #fff !important;
    color: #000;
    font-size: 9.5pt;
    line-height: 1.25;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* --- neutralize animations & effects (otherwise blank sections) --- */
  * {
    transition: none !important;
    animation: none !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  /* --- hide decoration + interactive elements --- */
  .progress,
  .topbar,
  .mobile-nav,
  .rail,
  body::before,
  .hero-orb .blob,
  .signal-wrap,
  #signal,
  .cluster .glow,
  .cta-row,
  .theme-btn,
  .menu-btn,
  .toast,
  .skip-link,
  .badges,
  .hero-meta,
  footer,
  .no-print {
    display: none !important;
  }

  .hero-orb::before,
  .hero-orb::after {
    content: none !important;
  }

  /* --- redundant "portfolio" sections removed to fit in 1–2 pages.
         Kept: Profile · Skills · Experience · Education · Contact.
         (Expertise & Fit = narrative duplicates of the skills.) --- */
  #expertise,
  #adequation {
    display: none !important;
  }

  /* --- reflow to a single column --- */
  .shell {
    display: block;
    max-width: none;
  }

  .main {
    padding: 0;
  }

  section {
    padding: 3px 0;
    border-top: none !important;
  }

  .skills-grid,
  .fit,
  .edu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 28px;
  }

  /* Profile: "facts" block hidden (info already in the header) →
     the profile text spans the full width. */
  .profil-grid {
    display: block;
  }

  .facts {
    display: none !important;
  }

  .lead-para {
    font-size: 12pt;
    max-width: none;
  }

  /* the profile paragraph: full width (the inline max-width
     must be neutralized with !important) + tighter margin */
  .lead-para+p {
    margin-top: 8px !important;
    max-width: none !important;
  }

  .projects {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  /* --- decorative hero replaced by the print header --- */
  .hero {
    display: none !important;
  }

  .print-head {
    display: flex;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 12px;
    padding-bottom: 8px;
  }

  /* portrait: left column, same height as the info block */
  .print-photo {
    width: 30mm;
    flex: 0 0 auto;
    align-self: stretch;
    object-fit: cover;
  }

  .print-head-text {
    flex: 1 1 auto;
    min-width: 0;
  }

  .print-head h1 {
    font-family: var(--f-display);
    font-weight: 800;
    font-size: 24pt;
    letter-spacing: -.02em;
    margin: 0;
  }

  .print-head .print-role {
    font-family: var(--f-display);
    font-weight: 600;
    font-size: 12pt;
    color: var(--accent);
    margin: 2px 0 0;
  }

  .print-head .print-contact {
    font-family: var(--f-mono);
    font-size: 9pt;
    color: var(--graphite);
    margin: 8px 0 0;
    line-height: 1.55;
  }

  .print-head .print-web {
    font-family: var(--f-mono);
    font-size: 9pt;
    color: var(--accent);
    margin: 6px 0 0;
  }

  .print-head .sep {
    color: var(--line);
    margin: 0 2px;
  }

  /* section titles (Experience, Proof…, A technical foundation…)
     hidden: the eyebrow labels act as titles. */
  h2 {
    display: none !important;
  }

  .eyebrow {
    margin-bottom: 12px;
  }

  /* no section number (data-n) when printing */
  .eyebrow::before {
    content: none !important;
  }

  /* --- skills: neither the bars nor the level (Expert/Advanced…) --- */
  .bar,
  .skill .top i {
    display: none;
  }

  .skill {
    margin-bottom: 5px;
  }

  .skill-col h3 {
    margin-bottom: 8px;
    padding-bottom: 5px;
  }

  /* --- tightened experience timeline --- */
  .timeline {
    margin-left: 0;
  }

  .tl {
    padding: 0 0 6px 20px;
    break-inside: avoid;
  }

  .tl h3 {
    font-size: 12pt;
    margin: 3px 0 1px;
  }

  .tl .org {
    margin-bottom: 3px;
  }

  .tl ul li {
    margin-bottom: 1px;
  }

  /* --- projects / cards: avoid page breaks --- */
  .proj,
  .fit-card,
  .cluster,
  .edu .row {
    break-inside: avoid;
  }

  .proj {
    border: 1px solid var(--line);
    box-shadow: none;
    padding: 6px 12px;
  }

  .proj h3 {
    font-size: 12pt;
    margin: 6px 0 4px;
  }

  .proj p {
    margin-bottom: 4px;
    line-height: 1.3;
  }

  /* projects: neither the "kind" line (category + arrow) nor the tags */
  .proj .kind,
  .proj .stack {
    display: none !important;
  }

  /* project URLs made visible/actionable on paper */
  .proj[href]::after {
    content: " — " attr(href);
    font-family: var(--f-mono);
    font-size: 8pt;
    color: var(--graphite);
    word-break: break-all;
  }

  /* Section 07 (Contact) and the footer hidden when printing:
     the contact details already appear in the print header. */
  #contact {
    display: none !important;
  }
}
