/* ============================================================
   Rafael da Luz — Portfolio
   style.css : thèmes, structure et composants principaux
   ------------------------------------------------------------
   Organisation :
   01. Variables de design     07. Accueil / Hero
   02. Réinitialisation        08. Bandeau de domaines
   03. Base & typographie      09. Sections & titres
   04. Utilitaires             10. À propos
   05. En-tête & navigation    11. Compétences
   06. Boutons & étiquettes    12. Expériences
   13. Projets & fenêtre       14. Contact
   15. Pied de page            16. Page 404
   17. Animations & accessibilité
   ============================================================ */

/* ------------------------------------------------------------
   01. Variables de design
   ------------------------------------------------------------ */
:root {
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --header-h: 72px;
  --container: 1180px;
  --gutter: clamp(20px, 5vw, 40px);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* Thème sombre (par défaut) */
  --bg: #07080b;
  --bg-soft: #0a0c11;
  --surface: #0d1015;
  --surface-2: #12161d;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.17);
  --text: #e9edf3;
  --text-soft: #c3cad4;
  --text-muted: #939dab;
  --accent: #7a5cff;
  --accent-2: #33a3ff;
  --accent-text: #b3a4ff;
  --accent-soft: rgba(122, 92, 255, 0.14);
  --accent-line: rgba(157, 139, 255, 0.55);
  --accent-contrast: #ffffff;
  --selection: rgba(122, 92, 255, 0.35);
  --glow: rgba(93, 110, 255, 0.22);
  --header-bg: rgba(7, 8, 11, 0.72);
  --shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

/* Thème clair */
:root[data-theme="light"] {
  --bg: #f7f8fa;
  --bg-soft: #eff1f5;
  --surface: #ffffff;
  --surface-2: #f2f4f8;
  --line: rgba(15, 20, 30, 0.1);
  --line-strong: rgba(15, 20, 30, 0.18);
  --text: #0b0f16;
  --text-soft: #333c49;
  --text-muted: #596372;
  --accent: #5b3df5;
  --accent-2: #0a6ac2;
  --accent-text: #4a2fe0;
  --accent-soft: rgba(91, 61, 245, 0.09);
  --accent-line: rgba(91, 61, 245, 0.42);
  --accent-contrast: #ffffff;
  --selection: rgba(91, 61, 245, 0.2);
  --glow: rgba(91, 61, 245, 0.13);
  --header-bg: rgba(247, 248, 250, 0.78);
  --shadow: 0 30px 60px -34px rgba(15, 23, 42, 0.25);
  color-scheme: light;
}

/* ------------------------------------------------------------
   02. Réinitialisation
   ------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

body.nav-open,
body.dialog-open {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
}

a {
  color: inherit;
}

ul,
ol {
  padding: 0;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  padding: 0.12em 0.38em;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-soft);
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--selection);
  color: var(--text);
}

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

main:focus {
  outline: none;
}

section[id] {
  scroll-margin-top: calc(var(--header-h) + 12px);
}

/* ------------------------------------------------------------
   03. Base & typographie
   ------------------------------------------------------------ */
h1,
h2,
h3,
h4 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

p {
  text-wrap: pretty;
}

::marker {
  color: var(--accent-line);
}

/* ------------------------------------------------------------
   04. Utilitaires
   ------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.text-muted {
  color: var(--text-muted);
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 0.86rem;
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.25s var(--ease);
}

.skip-link:focus {
  transform: none;
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 90;
  pointer-events: none;
  background: transparent;
}

.scroll-progress__bar {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.noscript-note {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ------------------------------------------------------------
   05. En-tête & navigation
   ------------------------------------------------------------ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  border-bottom: 1px solid transparent;
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease),
    backdrop-filter 0.35s var(--ease);
}

.site-header.is-scrolled {
  background: var(--header-bg);
  border-bottom-color: var(--line);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  flex: none;
}

.brand__mark,
.footer-brand .brand__mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(150deg, var(--accent-soft), transparent 75%);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--accent-text);
  transition: border-color 0.3s var(--ease);
}

.brand:hover .brand__mark {
  border-color: var(--accent-line);
}

.brand__text {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.brand__text small {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 3px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.main-nav a {
  position: relative;
  display: inline-block;
  padding: 10px 12px;
  font-size: 0.88rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.25s var(--ease);
  white-space: nowrap;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease);
}

.main-nav a:hover,
.main-nav a[aria-current="true"] {
  color: var(--text);
}

.main-nav a:hover::after,
.main-nav a[aria-current="true"]::after {
  transform: scaleX(1);
}

/* Le bouton de contact n’apparaît que dans le panneau mobile
   (spécificité renforcée pour ne pas être écrasé par .btn) */
.main-nav .nav-cta {
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.icon-button {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease),
    background-color 0.25s var(--ease);
}

.icon-button:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--surface);
}

.theme-icon--sun {
  display: none;
}

.theme-icon--moon {
  display: block;
}

:root[data-theme="light"] .theme-icon--sun {
  display: block;
}

:root[data-theme="light"] .theme-icon--moon {
  display: none;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.menu-toggle__bar {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s var(--ease);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) {
  transform: translateY(3.25px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) {
  transform: translateY(-3.25px) rotate(-45deg);
}

/* ------------------------------------------------------------
   06. Boutons & étiquettes
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.93rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    border-color 0.3s var(--ease), background-color 0.3s var(--ease),
    color 0.25s var(--ease);
}

.btn--primary {
  background: var(--accent);
  background-image: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: var(--accent-contrast);
  box-shadow: 0 14px 34px -16px var(--accent);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 38px -16px var(--accent);
}

.btn--ghost {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--accent-line);
  background: var(--surface);
}

.btn__arrow {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  transition: transform 0.3s var(--ease);
}

.btn:hover .btn__arrow {
  transform: translateX(2px);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.tag {
  display: inline-block;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.69rem;
  letter-spacing: 0.01em;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.tag.is-placeholder {
  border-style: dashed;
  color: var(--text-muted);
  background: transparent;
}

/* ------------------------------------------------------------
   07. Accueil / Hero
   ------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: calc(var(--header-h) + clamp(40px, 7vh, 88px));
  padding-bottom: clamp(28px, 4vh, 44px);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(58% 52% at 78% 24%, var(--glow), transparent 72%),
    radial-gradient(46% 40% at 8% 92%, rgba(51, 163, 255, 0.1), transparent 70%),
    linear-gradient(180deg, transparent 62%, var(--bg) 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 76px 76px;
  -webkit-mask-image: radial-gradient(ellipse 72% 62% at 52% 38%, #000 18%, transparent 76%);
  mask-image: radial-gradient(ellipse 72% 62% at 52% 38%, #000 18%, transparent 76%);
  opacity: 0.55;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  align-items: center;
  gap: clamp(40px, 6vw, 72px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.6;
}

.status-dot {
  position: relative;
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  flex: none;
}

.status-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--accent-2);
  opacity: 0.45;
  animation: dotPulse 3.6s var(--ease) infinite;
}

.hero-name {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.24em;
  margin-top: 20px;
  font-size: clamp(2.9rem, 7.4vw, 5.8rem);
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.hero-name__last {
  background: linear-gradient(120deg, var(--accent-text), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-role {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  font-size: clamp(1.05rem, 1.7vw, 1.32rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--accent-text);
}

.hero-caret {
  display: inline-block;
  width: 1.5px;
  height: 1.1em;
  background: var(--accent);
  opacity: 0.8;
  animation: caretBlink 1.2s steps(1) infinite;
}

.hero-pitch {
  max-width: 52ch;
  margin-top: 18px;
  color: var(--text-muted);
  font-size: clamp(1rem, 1.25vw, 1.06rem);
  line-height: 1.78;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-tags {
  margin-top: 34px;
}

.hero-tags .tag {
  background: transparent;
}

.hero-tags .tag:hover {
  color: var(--text-soft);
  border-color: var(--line-strong);
}

/* Visuel : topologie réseau abstraite */
.hero-visual {
  position: relative;
  width: 100%;
  animation: visualIn 1.1s var(--ease) both 0.15s;
}

.hero-visual__frame {
  position: relative;
  padding: clamp(10px, 1.3vw, 15px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(160deg, var(--surface-2), var(--surface) 55%, var(--bg-soft));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-visual__frame::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(80% 55% at 72% 0%, var(--glow), transparent 70%);
}

.topography {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.topo-grid-line {
  stroke: var(--line-strong);
  stroke-width: 1;
}

.topo-rings {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1;
  stroke-dasharray: 2 7;
  opacity: 0.65;
}

.topo-links path {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1.1;
}

.topo-links--flow path {
  stroke: var(--accent-line);
  stroke-width: 1.3;
  stroke-dasharray: 4 10;
  animation: dashFlow 26s linear infinite;
}

.topo-node .node-halo {
  fill: var(--accent);
  opacity: 0.14;
}

.topo-node .node-body {
  fill: url(#node-gradient);
  filter: drop-shadow(0 0 10px var(--glow));
}

.topo-node .node-core {
  fill: #ffffff;
}

.topo-node--blue .node-halo {
  fill: var(--accent-2);
}

.topo-node--blue .node-body {
  fill: var(--accent-2);
}

.topo-node--core .node-halo {
  opacity: 0.2;
  animation: haloPulse 6s var(--ease) infinite;
}

.topo-label {
  fill: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.topo-crosses path {
  stroke: var(--line-strong);
  stroke-width: 1;
}

.hero-visual__caption {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
  padding: 12px 4px 2px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(40px, 6vh, 72px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

.scroll-cue:hover {
  color: var(--text);
}

.scroll-cue__line {
  position: relative;
  display: block;
  width: 34px;
  height: 1px;
  background: var(--line-strong);
  overflow: hidden;
}

.scroll-cue__line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateX(-100%);
  animation: cueSlide 2.8s var(--ease) infinite;
}

.hero-foot__meta {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* ------------------------------------------------------------
   08. Bandeau de domaines
   ------------------------------------------------------------ */
.strip {
  border-block: 1px solid var(--line);
  background: var(--bg-soft);
  padding-block: 16px;
}

.strip__inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px clamp(16px, 4vw, 38px);
}

.strip__label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-right: 22px;
  border-right: 1px solid var(--line);
}

.strip__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.strip__list li {
  position: relative;
  padding-left: 14px;
}

.strip__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 4px;
  background: var(--accent-line);
  transform: translateY(-50%) rotate(45deg);
}

/* ------------------------------------------------------------
   09. Sections & titres
   ------------------------------------------------------------ */
.section {
  position: relative;
  padding-block: clamp(80px, 10vw, 128px);
}

.section--alt {
  background: linear-gradient(180deg, var(--bg-soft), var(--bg));
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 780px;
  margin-bottom: clamp(40px, 6vw, 64px);
}

.section-index {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section-index::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent-line);
  flex: none;
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 3.05rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
}

.section-lede {
  max-width: 62ch;
  margin-top: 20px;
  color: var(--text-muted);
  font-size: clamp(1rem, 1.3vw, 1.06rem);
  line-height: 1.72;
}

/* ------------------------------------------------------------
   10. À propos
   ------------------------------------------------------------ */
.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: start;
  gap: clamp(32px, 5vw, 72px);
}

.about-text p {
  max-width: 62ch;
  margin-bottom: 18px;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.2vw, 1.06rem);
  line-height: 1.8;
}

.about-text p:first-child {
  font-size: clamp(1.06rem, 1.45vw, 1.16rem);
  color: var(--text);
}

.approach {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 32px;
  list-style: none;
}

.approach li {
  position: relative;
  padding: 16px 16px 16px 50px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-size: 0.89rem;
  line-height: 1.55;
  color: var(--text-soft);
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.approach li:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.approach__index {
  position: absolute;
  left: 16px;
  top: 17px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  color: var(--accent-text);
}

.profile-card {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(170deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow);
}

.profile-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.profile-card__avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border: 1px solid var(--accent-line);
  border-radius: 14px;
  background: var(--accent-soft);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--accent-text);
}

.profile-card__name {
  font-size: 0.97rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.profile-card__role {
  margin-top: 2px;
  font-size: 0.79rem;
  color: var(--text-muted);
}

.profile-card__facts {
  margin-top: 4px;
}

.fact {
  display: grid;
  gap: 3px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.fact:last-child {
  border-bottom: 0;
}

.fact__label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.fact__value {
  font-size: 0.9rem;
  color: var(--text-soft);
}

.fact__value.is-placeholder {
  display: inline-block;
  justify-self: start;
  border-bottom: 1px dashed var(--line-strong);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
}

.profile-card__note {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.65;
  color: var(--text-muted);
}

/* ------------------------------------------------------------
   11. Compétences
   ------------------------------------------------------------ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
  gap: 16px;
}

.skill-card {
  position: relative;
  padding: clamp(20px, 2.4vw, 26px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.45s var(--ease), border-color 0.35s var(--ease),
    box-shadow 0.45s var(--ease);
}

.skill-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.55s var(--ease);
}

.skill-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.skill-card:hover::before {
  width: 100%;
}

.skill-card__index {
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.skill-card__title {
  margin-bottom: 16px;
  font-size: 1.04rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ------------------------------------------------------------
   12. Expériences
   ------------------------------------------------------------ */
.timeline {
  position: relative;
  padding-left: 26px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent-line), var(--line) 45%, transparent);
}

.timeline--empty {
  padding-left: 0;
}

.timeline--empty::before {
  display: none;
}

.timeline-item {
  position: relative;
  padding: 0 0 20px 18px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -25px;
  top: 26px;
  width: 9px;
  height: 9px;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 0 0 4px var(--bg);
}

.timeline-card {
  padding: clamp(18px, 2.4vw, 26px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.3s var(--ease);
}

.timeline-card:hover {
  border-color: var(--line-strong);
}

.timeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 20px;
}

.timeline-head h3 {
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.timeline-head h3.is-placeholder {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
}

.timeline-company {
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.timeline-date {
  flex: none;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.timeline-summary {
  margin-top: 14px;
  font-size: 0.93rem;
  line-height: 1.7;
  color: var(--text-soft);
}

.timeline-points {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  list-style: none;
}

.timeline-points li {
  position: relative;
  padding-left: 16px;
  font-size: 0.89rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.timeline-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 5px;
  height: 1px;
  background: var(--accent-line);
}

.timeline-card .tag-list {
  margin-top: 16px;
}

/* Contenu manquant / état vide */
.empty-state {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 10px;
  max-width: 660px;
  padding: clamp(24px, 4vw, 40px);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(170deg, var(--surface), var(--bg-soft));
  overflow: hidden;
}

.empty-state::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(70% 85% at 100% 0%, var(--glow), transparent 70%);
  opacity: 0.75;
}

.empty-state > * {
  position: relative;
  z-index: 1;
}

.empty-state__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--accent-line);
  border-radius: 10px;
  background: var(--accent-soft);
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent-text);
}

.empty-state__title {
  margin-top: 6px;
  font-size: 1.04rem;
  font-weight: 600;
}

.empty-state p {
  position: relative;
  max-width: 52ch;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.empty-state__hint {
  padding-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.7rem !important;
}

/* ------------------------------------------------------------
   13. Projets & fenêtre de détails
   ------------------------------------------------------------ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(286px, 1fr));
  gap: 18px;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.4s var(--ease),
    box-shadow 0.5s var(--ease);
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.project-card__media {
  position: relative;
  aspect-ratio: 8 / 5;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(150deg, var(--surface-2), var(--bg-soft));
  overflow: hidden;
}

.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.project-card:hover .project-card__media img {
  transform: scale(1.035);
}

.project-card__slot,
.project-card__badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  pointer-events: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.project-card__slot {
  left: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(7, 8, 11, 0.66);
  color: #d5dbe4;
}

.project-card__badge {
  right: 12px;
  border: 1px solid var(--accent-line);
  background: rgba(72, 56, 160, 0.4);
  color: #e4defe;
}

.project-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px 22px;
}

.project-card__category {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.project-card__title {
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.project-card__title.is-placeholder {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--text-muted);
}

.project-card__summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  font-size: 0.89rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.project-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.project-card__more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-soft);
  transition: color 0.3s var(--ease);
}

.project-card__more::after {
  content: "↗";
  font-size: 0.86rem;
  transition: transform 0.4s var(--ease);
}

.project-card:hover .project-card__more {
  color: var(--accent-text);
}

.project-card:hover .project-card__more::after {
  transform: translate(2px, -2px);
}

/* Bouton transparent qui couvre toute la carte */
.project-card__trigger {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: var(--radius-lg);
  cursor: pointer;
}

.project-card__trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -4px;
}

/* Fenêtre de détails (élément natif <dialog>) */
.project-dialog {
  width: min(760px, calc(100vw - 32px));
  max-width: none;
  max-height: min(860px, calc(100dvh - 48px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 50px 140px -40px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

.project-dialog::backdrop {
  background: rgba(4, 5, 8, 0.7);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.project-dialog[open] {
  animation: dialogIn 0.35s var(--ease);
}

.project-dialog__inner {
  position: relative;
  max-height: inherit;
  padding: clamp(24px, 4vw, 40px);
  overflow-y: auto;
}

.project-dialog__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text-muted);
  cursor: pointer;
  background: var(--surface);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.project-dialog__close:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.project-dialog__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.project-dialog__title {
  max-width: calc(100% - 40px);
  margin-top: 10px;
  font-size: clamp(1.5rem, 3vw, 1.98rem);
  letter-spacing: -0.03em;
}

.project-dialog__title.is-placeholder {
  font-family: var(--font-mono);
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  font-weight: 400;
  color: var(--text-muted);
}

.project-dialog__summary {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 0.97rem;
  line-height: 1.72;
}

.project-dialog__section {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.project-dialog__section h3 {
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.project-dialog__section p {
  color: var(--text-soft);
  font-size: 0.93rem;
  line-height: 1.76;
}

.project-dialog__highlights {
  display: grid;
  gap: 8px;
  list-style: none;
}

.project-dialog__highlights li {
  position: relative;
  padding-left: 18px;
  color: var(--text-soft);
  font-size: 0.91rem;
  line-height: 1.62;
}

.project-dialog__highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 1px;
  background: var(--accent-line);
}

.project-dialog__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.project-dialog__note {
  margin-top: 18px;
  padding: 10px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* ------------------------------------------------------------
   14. Contact
   ------------------------------------------------------------ */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(32px, 6vw, 80px);
}

.contact-copy .section-title {
  margin-top: 0;
}

.contact-copy__status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 28px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.contact-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(170deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.contact-list {
  list-style: none;
}

.contact-item + .contact-item {
  border-top: 1px solid var(--line);
}

.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.3s var(--ease);
}

.contact-row:hover {
  background: var(--surface-2);
}

.contact-row__body {
  min-width: 0;
}

.contact-row__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.61rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-row__value {
  display: block;
  margin-top: 4px;
  font-size: 0.93rem;
  color: var(--text);
  overflow-wrap: anywhere;
}

.contact-row__arrow {
  flex: none;
  color: var(--text-muted);
  transition: color 0.3s var(--ease), transform 0.35s var(--ease);
}

.contact-row:hover .contact-row__arrow {
  color: var(--accent-text);
  transform: translate(2px, -2px);
}

.contact-row.is-pending {
  cursor: default;
}

.contact-row.is-pending .contact-row__value {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.contact-panel__note {
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ------------------------------------------------------------
   15. Pied de page
   ------------------------------------------------------------ */
.site-footer {
  padding-block: clamp(32px, 5vw, 48px);
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

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

.footer-brand__name {
  font-size: 0.9rem;
  font-weight: 500;
}

.footer-brand__role {
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.footer-nav a {
  font-size: 0.83rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

.footer-nav a:hover {
  color: var(--text);
}

.footer-meta {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  line-height: 1.75;
  text-align: right;
  color: var(--text-muted);
}

/* ------------------------------------------------------------
   16. Bouton retour en haut & page 404
   ------------------------------------------------------------ */
.back-to-top {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 50;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease),
    visibility 0.3s, color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.back-to-top:hover {
  border-color: var(--accent-line);
  color: var(--accent-text);
}

.error-main {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100svh;
  padding-top: calc(var(--header-h) + 56px);
  padding-bottom: 80px;
  overflow: hidden;
  background: radial-gradient(60% 55% at 72% 18%, var(--glow), transparent 70%);
}

.error-main::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 76px 76px;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 40% 45%, #000 15%, transparent 78%);
  mask-image: radial-gradient(ellipse 60% 55% at 40% 45%, #000 15%, transparent 78%);
  opacity: 0.5;
}

.error-inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.error-code {
  font-family: var(--font-mono);
  font-size: clamp(5rem, 19vw, 11.5rem);
  line-height: 0.84;
  letter-spacing: -0.06em;
  background: linear-gradient(120deg, var(--accent-text), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.92;
}

.error-title {
  margin-top: 26px;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  letter-spacing: -0.03em;
}

.error-text {
  max-width: 52ch;
  margin-top: 14px;
  color: var(--text-muted);
  line-height: 1.72;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.error-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.error-nav a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

.error-nav a:hover {
  color: var(--text);
}

/* ------------------------------------------------------------
   17. Animations, révélation au défilement & accessibilité
   ------------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.hero-copy > .eyebrow {
  animation: riseIn 0.8s var(--ease) both 0.05s;
}

.hero-copy > .hero-name {
  animation: riseIn 0.9s var(--ease) both 0.12s;
}

.hero-copy > .hero-role {
  animation: riseIn 0.9s var(--ease) both 0.22s;
}

.hero-copy > .hero-pitch {
  animation: riseIn 0.9s var(--ease) both 0.3s;
}

.hero-copy > .hero-actions {
  animation: riseIn 0.9s var(--ease) both 0.38s;
}

.hero-copy > .hero-tags {
  animation: riseIn 0.9s var(--ease) both 0.46s;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(16px);
    filter: blur(5px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes visualIn {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes dotPulse {
  0% {
    transform: scale(0.7);
    opacity: 0.5;
  }
  55% {
    transform: scale(1.6);
    opacity: 0;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

@keyframes caretBlink {
  0%,
  55% {
    opacity: 0.8;
  }
  56%,
  100% {
    opacity: 0;
  }
}

@keyframes dashFlow {
  to {
    stroke-dashoffset: -240;
  }
}

@keyframes haloPulse {
  0%,
  100% {
    opacity: 0.16;
  }
  50% {
    opacity: 0.32;
  }
}

@keyframes cueSlide {
  0% {
    transform: translateX(-100%);
  }
  60%,
  100% {
    transform: translateX(100%);
  }
}

@keyframes dialogIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Respect du réglage système « réduire les animations » */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal,
  .hero-copy > *,
  .hero-visual {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
