/* =========================================================
   CV — Romain GRIFFE
   Premium, animated, fully responsive
   ========================================================= */

:root {
  --bg: #fdfaf5;
  --bg-soft: #fff4e8;
  --surface: #ffffff;
  --surface-2: #fffaf3;
  --border: #f5e6d3;
  --border-soft: #faf0e0;

  --text: #1c1917;
  --text-soft: #57534e;
  --muted: #78716c;

  --primary: #ea580c;
  --primary-2: #c2410c;
  --primary-soft: #ffedd5;
  --accent: #f59e0b;
  --accent-2: #dc2626;
  --success: #16a34a;
  --warning: #f59e0b;

  --grad: linear-gradient(135deg, #fb923c 0%, #ea580c 50%, #dc2626 100%);
  --grad-warm: linear-gradient(135deg, #fbbf24 0%, #f97316 50%, #ea580c 100%);
  --grad-soft: linear-gradient(135deg, #ffedd5 0%, #fef3c7 50%, #fed7aa 100%);

  --shadow-xs: 0 1px 2px rgba(28, 25, 23, 0.04);
  --shadow-sm: 0 4px 12px rgba(234, 88, 12, 0.06);
  --shadow-md: 0 10px 30px rgba(234, 88, 12, 0.1);
  --shadow-lg: 0 30px 60px rgba(234, 88, 12, 0.18);
  --shadow-glow: 0 0 0 1px rgba(234, 88, 12, 0.12), 0 20px 40px rgba(234, 88, 12, 0.22);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  --container: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--primary-2); }

mark {
  background: linear-gradient(180deg, transparent 60%, rgba(234, 88, 12, 0.18) 60%);
  color: inherit;
  padding: 0 2px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.gradient-text {
  background: linear-gradient(120deg, #fb923c 0%, #ea580c 25%, #dc2626 50%, #f59e0b 75%, #fb923c 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  animation: shimmer 6s linear infinite;
}

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.gradient-text--white {
  background: linear-gradient(135deg, #ffffff 0%, #fed7aa 100%);
  background-size: auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: none;
}

/* =========================================================
   BACKGROUND SHAPES
   ========================================================= */

.bg-shapes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float 18s var(--ease) infinite;
}

.shape--1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #fdba74, transparent 70%);
  top: -200px; left: -150px;
}

.shape--2 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #fcd34d, transparent 70%);
  top: 30%; right: -200px;
  animation-delay: -6s;
}

.shape--3 {
  width: 450px; height: 450px;
  background: radial-gradient(circle, #fca5a5, transparent 70%);
  bottom: -150px; left: 30%;
  animation-delay: -12s;
}

.shape-grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(15, 23, 42, 0.08) 1px, transparent 0);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, #000 0%, transparent 70%);
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.05); }
  66% { transform: translate(-30px, 40px) scale(0.95); }
}

main, .topbar, .footer { position: relative; z-index: 1; }

/* =========================================================
   SCROLL PROGRESS
   ========================================================= */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  z-index: 100;
}

.scroll-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--grad);
  transition: width 0.1s linear;
}

/* =========================================================
   LOADER
   ========================================================= */

.loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: grid;
  place-items: center;
  z-index: 200;
  transition: opacity 0.6s var(--ease), visibility 0.6s var(--ease);
}

.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loader__logo {
  display: flex;
  gap: 4px;
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.loader__logo span {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: loaderPulse 1s var(--ease) infinite alternate;
}

.loader__logo span:nth-child(2) { animation-delay: 0.15s; }

@keyframes loaderPulse {
  from { transform: translateY(0); opacity: 0.3; }
  to { transform: translateY(-10px); opacity: 1; }
}

/* =========================================================
   TOPBAR
   ========================================================= */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 250, 245, 0.75);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: all 0.3s var(--ease);
}

.topbar.is-scrolled {
  background: rgba(255, 255, 255, 0.85);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.topbar__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.topbar__brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--grad);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.3);
  transition: transform 0.3s var(--ease);
}

.topbar__brand:hover .topbar__brand-mark {
  transform: rotate(-8deg) scale(1.05);
}

.topbar__nav {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.nav-link {
  position: relative;
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s var(--ease);
}

.nav-link span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 600;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(234, 88, 12, 0.08);
}

.nav-link:hover span {
  color: var(--primary);
}

.topbar__burger {
  display: none;
  background: none;
  border: 0;
  width: 40px;
  height: 40px;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border-radius: 10px;
}

.topbar__burger span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}

.topbar__burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.topbar__burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.topbar__burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =========================================================
   DRAWER (mobile)
   ========================================================= */

.drawer {
  position: fixed;
  top: 72px;
  left: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-lg);
  z-index: 49;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s var(--ease);
}

.drawer.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.drawer__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  color: var(--text);
  font-weight: 500;
  font-size: 1rem;
  transition: background 0.2s var(--ease);
}

.drawer__link:hover {
  background: rgba(234, 88, 12, 0.08);
}

.drawer__link span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 0;
  font-family: inherit;
  transition: all 0.3s var(--ease);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s var(--ease);
}

.btn--primary {
  background: var(--grad);
  background-size: 200% 200%;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(234, 88, 12, 0.3);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(234, 88, 12, 0.4);
  background-position: 100% 100%;
}

.btn--primary:hover svg {
  transform: translateX(3px);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.btn--ghost:hover {
  background: #fff;
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--sm {
  padding: 9px 16px;
  font-size: 0.85rem;
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
  position: relative;
  padding: 60px 0 80px;
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
}

.hero__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
  width: 100%;
}

.hero__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(16, 185, 129, 0.2);
  margin-bottom: 24px;
}

.hero__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  position: relative;
}

.hero__status-dot::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--success);
  opacity: 0.4;
  animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

.hero__title {
  margin: 0 0 16px;
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.hero__line {
  display: block;
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 500;
  color: var(--text-soft);
  margin-bottom: 4px;
  letter-spacing: 0;
}

.hero__name {
  display: block;
}

.hero__name .gradient-text {
  display: inline-block;
  margin-right: 0.25em;
}

.hero__role {
  margin: 0 0 24px;
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  color: var(--text);
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  min-height: 1.6em;
}

.typed::before {
  content: "> ";
  color: var(--primary);
}

.caret {
  color: var(--primary);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero__bio {
  font-size: 1.05rem;
  color: var(--text-soft);
  margin: 0 0 32px;
  max-width: 560px;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.hero__contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero__contact-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-soft);
  font-weight: 500;
  backdrop-filter: blur(8px);
  transition: all 0.2s var(--ease);
}

.hero__contact-item svg {
  width: 14px; height: 14px;
  fill: none; stroke: var(--primary);
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.hero__contact-item:hover:not(.hero__contact-item--static) {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
  background: #fff;
}

.hero__contact-item--static {
  cursor: default;
}

/* HERO RIGHT (avatar card) */

.hero__right {
  display: flex;
  justify-content: center;
}

.hero__visual {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
}

.hero__card {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1;
}

.hero__avatar-ring {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.hero__avatar-ring::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--primary), var(--accent), #fbbf24, var(--accent-2), var(--primary));
  animation: spin 10s linear infinite;
  filter: blur(3px);
  opacity: 0.55;
}

.hero__avatar-ring::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: inset 0 0 30px rgba(234, 88, 12, 0.08);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hero__avatar {
  position: relative;
  width: 75%;
  height: 75%;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  box-shadow: var(--shadow-glow);
  z-index: 1;
}

.hero__badge {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-md);
  font-size: 0.85rem;
  z-index: 2;
  animation: floatBadge 4s var(--ease) infinite;
}

.hero__badge strong {
  display: block;
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
}

.hero__badge em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.78rem;
}

.hero__badge-icon {
  font-size: 1.4rem;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--grad-soft);
  border-radius: 10px;
  flex-shrink: 0;
}

.hero__badge--1 {
  top: 4%;
  left: -8%;
  animation-delay: 0s;
}

.hero__badge--2 {
  top: 35%;
  right: -10%;
  animation-delay: -1.5s;
}

.hero__badge--3 {
  bottom: 6%;
  left: 8%;
  animation-delay: -3s;
}

@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* HERO scroll cue */

.hero__scroll {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 46px;
  border: 2px solid var(--border);
  border-radius: 14px;
  display: grid;
  place-items: start center;
  padding-top: 8px;
}

.hero__scroll span {
  width: 4px;
  height: 8px;
  background: var(--primary);
  border-radius: 2px;
  animation: scrollCue 1.6s var(--ease) infinite;
}

@keyframes scrollCue {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(14px); opacity: 0; }
}

/* =========================================================
   STATS
   ========================================================= */

.stats {
  padding: 40px 0 20px;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.stat {
  text-align: center;
  position: relative;
  padding: 8px 4px;
  border-radius: 12px;
  transition: all 0.3s var(--ease);
}

.stat:hover {
  background: rgba(255, 237, 213, 0.5);
  transform: translateY(-4px);
}

.stat:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -8px;
  top: 20%;
  bottom: 20%;
  width: 1px;
  background: var(--border);
}

.stat__num {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 12px rgba(234, 88, 12, 0.15));
}

.stat__label {
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 500;
}

/* =========================================================
   SECTIONS
   ========================================================= */

.section {
  padding: 80px 0;
  position: relative;
}

.section--alt {
  background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.6) 50%, transparent 100%);
}

.section__header {
  text-align: center;
  margin-bottom: 56px;
}

.section__eyebrow {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
  padding: 6px 14px;
  background: rgba(234, 88, 12, 0.08);
  border-radius: 999px;
}

.section__eyebrow--light {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.section__title {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 3rem);
  letter-spacing: -0.02em;
  font-weight: 800;
  line-height: 1.1;
}

.section__sub {
  margin: 16px auto 0;
  max-width: 620px;
  color: var(--text-soft);
  font-size: 1.05rem;
}

/* =========================================================
   PROFIL
   ========================================================= */

.profile {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 32px;
  align-items: start;
}

.profile__main {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  box-shadow: var(--shadow-sm);
}

.profile__lead {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 18px;
  font-weight: 500;
}

.profile__main p {
  color: var(--text-soft);
  margin: 0 0 14px;
  font-size: 1rem;
}

.profile__goal {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 24px 0 0 !important;
  padding: 18px 22px;
  background: var(--grad-soft);
  border-radius: var(--radius);
  color: var(--text) !important;
  font-weight: 500;
}

.profile__goal-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.profile__side {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  box-shadow: var(--shadow-sm);
}

.profile__side-title {
  margin: 0 0 18px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
}

.soft-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.soft-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 244, 232, 0.7);
  border-radius: 12px;
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
  transition: all 0.2s var(--ease);
}

.soft-list li:hover {
  background: var(--grad-soft);
  transform: translateX(4px);
}

.soft-list__icon {
  font-size: 1.2rem;
}

/* =========================================================
   TIMELINE
   ========================================================= */

.timeline {
  position: relative;
  margin-bottom: 60px;
  padding-left: 32px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--accent), transparent);
  border-radius: 2px;
}

.timeline__item {
  position: relative;
}

.timeline__dot {
  position: absolute;
  left: -32px;
  top: 28px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--primary);
  z-index: 1;
}

.timeline__dot::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--grad);
}

.timeline__dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.3;
  animation: ping 2s var(--ease) infinite;
}

.timeline__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s var(--ease);
}

.timeline__card:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(234, 88, 12, 0.2);
  transform: translateY(-2px);
}

.timeline__date {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(234, 88, 12, 0.08);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.timeline__role {
  margin: 0 0 6px;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.timeline__company {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 1rem;
  color: var(--text-soft);
}

.timeline__company-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--grad);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 800;
}

.timeline__contract {
  background: var(--success);
  color: #fff;
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.timeline__context {
  margin: 18px 0 24px;
  color: var(--muted);
  font-style: italic;
  padding: 14px 18px;
  background: var(--bg-soft);
  border-radius: 12px;
  border-left: 3px solid var(--accent);
  font-size: 0.95rem;
}

.timeline__sections {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.timeline__heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
}

.timeline__heading-icon {
  font-size: 1.1rem;
}

.bullet-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}

.bullet-list li {
  position: relative;
  padding-left: 22px;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.5;
  transition: color 0.2s var(--ease);
}

.bullet-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--grad);
}

.bullet-list li:hover {
  color: var(--text);
}

.achievement-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.achievement-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, transparent 100%);
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 12px;
  color: var(--text);
  font-size: 0.95rem;
  transition: all 0.2s var(--ease);
}

.achievement-list li:hover {
  border-color: rgba(245, 158, 11, 0.35);
  transform: translateX(4px);
}

.achievement-list__check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--grad-warm);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.35);
}

.strategy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.strategy {
  padding: 16px 18px;
  background: var(--bg-soft);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-left: 3px solid var(--primary);
  transition: all 0.2s var(--ease);
}

.strategy:hover {
  background: var(--grad-soft);
  transform: translateY(-2px);
}

.strategy strong {
  font-size: 0.95rem;
  color: var(--text);
}

.strategy span {
  font-size: 0.85rem;
  color: var(--text-soft);
}

/* COMPACT TIMELINE (anciennes missions) */

.timeline__item--compact {
  margin-top: 20px;
}

.timeline__dot--secondary {
  border-color: var(--accent);
  width: 24px;
  height: 24px;
  top: 32px;
}

.timeline__dot--secondary::before {
  background: linear-gradient(135deg, var(--accent), var(--primary));
}

.timeline__dot--secondary::after {
  display: none;
}

.timeline__dot--muted {
  border-color: var(--border);
  border-width: 2px;
  width: 20px;
  height: 20px;
  top: 34px;
  background: var(--surface);
}

.timeline__dot--muted::before {
  background: var(--muted);
  inset: 3px;
}

.timeline__dot--muted::after {
  display: none;
}

.timeline__card--compact {
  padding: 24px 28px;
  background: var(--surface);
}

.timeline__card--compact .timeline__role {
  font-size: 1.15rem;
}

.timeline__card--compact .timeline__company {
  font-size: 0.92rem;
}

.timeline__card--compact .timeline__date {
  font-size: 0.75rem;
}

.timeline__card--mini {
  padding: 22px 26px;
}

.timeline__company-logo--alt {
  background: linear-gradient(135deg, var(--accent), var(--primary-2));
}

.timeline__company-logo--muted {
  background: linear-gradient(135deg, #94a3b8, #64748b);
}

.timeline__contract--alt {
  background: var(--accent);
}

.timeline__contract--muted {
  background: var(--muted);
  font-weight: 600;
}

.bullet-list--mini {
  grid-template-columns: 1fr 1fr;
  gap: 6px 24px;
  margin-top: 16px;
}

.bullet-list--mini li {
  font-size: 0.9rem;
  padding-left: 18px;
}

.bullet-list--mini li::before {
  width: 6px;
  height: 6px;
  top: 9px;
}

.timeline__mini-desc {
  margin: 14px 0 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  padding: 12px 16px;
  background: var(--bg-soft);
  border-radius: 10px;
}

/* KEY SKILLS */

.key-skills {
  text-align: center;
  margin-top: 40px;
}

.key-skills__title {
  margin: 0 0 24px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.key-skills__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.key-skill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  transition: all 0.3s var(--ease);
  cursor: default;
}

.key-skill span {
  font-size: 1.1rem;
}

.key-skill:hover {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* =========================================================
   STACK
   ========================================================= */

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

.stack-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease);
}

.stack-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad-soft);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  z-index: 0;
}

.stack-card > * {
  position: relative;
  z-index: 1;
}

.stack-card:hover {
  border-color: transparent;
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.stack-card:hover::before {
  opacity: 1;
}

.stack-card--wide {
  grid-column: span 3;
}

.stack-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.stack-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--grad);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.3);
  transition: transform 0.4s var(--ease);
}

.stack-card:hover .stack-card__icon {
  transform: rotate(-8deg) scale(1.1);
}

.stack-card__icon::before {
  content: "";
  width: 22px;
  height: 22px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  filter: brightness(0) invert(1);
}

.stack-card__icon[data-icon="server"]::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='2' y='2' width='20' height='8' rx='2'/><rect x='2' y='14' width='20' height='8' rx='2'/><line x1='6' y1='6' x2='6.01' y2='6'/><line x1='6' y1='18' x2='6.01' y2='18'/></svg>");
}
.stack-card__icon[data-icon="cloud"]::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z'/></svg>");
}
.stack-card__icon[data-icon="shield"]::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/></svg>");
}
.stack-card__icon[data-icon="radar"]::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><circle cx='12' cy='12' r='6'/><circle cx='12' cy='12' r='2'/></svg>");
}
.stack-card__icon[data-icon="backup"]::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><ellipse cx='12' cy='5' rx='9' ry='3'/><path d='M3 5v14a9 3 0 0 0 18 0V5'/><path d='M3 12a9 3 0 0 0 18 0'/></svg>");
}
.stack-card__icon[data-icon="lock"]::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='11' width='18' height='11' rx='2'/><path d='M7 11V7a5 5 0 0 1 10 0v4'/></svg>");
}
.stack-card__icon[data-icon="tools"]::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z'/></svg>");
}

.stack-card h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.stack-card__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stack-card__list li {
  position: relative;
  padding-left: 18px;
  font-size: 0.92rem;
  color: var(--text-soft);
}

.stack-card__list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.stack-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stack-card__chips span {
  background: rgba(234, 88, 12, 0.08);
  color: var(--primary);
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid rgba(234, 88, 12, 0.15);
  transition: all 0.2s var(--ease);
}

.stack-card__chips span:hover {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
}

/* =========================================================
   FORMATION
   ========================================================= */

.formation {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  display: flex;
  align-items: center;
  gap: 28px;
  box-shadow: var(--shadow-sm);
  max-width: 800px;
  margin: 0 auto;
}

.formation__icon {
  font-size: 3rem;
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  background: var(--grad-soft);
  border-radius: 20px;
}

.formation__title {
  margin: 4px 0 8px;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.formation__text {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.98rem;
}

/* =========================================================
   CONTACT
   ========================================================= */

.contact-section {
  padding-bottom: 100px;
}

.contact {
  position: relative;
  background: linear-gradient(135deg, #9a3412 0%, #c2410c 40%, #ea580c 75%, #f59e0b 100%);
  border-radius: var(--radius-xl);
  padding: 70px 50px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(234, 88, 12, 0.4);
}

.contact__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.contact__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
}

.contact__orb--1 {
  width: 400px;
  height: 400px;
  background: rgba(251, 191, 36, 0.45);
  top: -100px;
  right: -100px;
  animation: float 14s var(--ease) infinite;
}

.contact__orb--2 {
  width: 350px;
  height: 350px;
  background: rgba(220, 38, 38, 0.4);
  bottom: -100px;
  left: -100px;
  animation: float 16s var(--ease) infinite reverse;
}

.contact__inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.contact__title {
  margin: 16px 0 12px;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.1;
}

.contact__sub {
  max-width: 560px;
  margin: 0 auto 40px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.05rem;
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

.contact-card-x {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #fff !important;
  text-align: left;
  position: relative;
  transition: all 0.3s var(--ease);
}

.contact-card-x:hover:not(.contact-card-x--static) {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-4px);
}

.contact-card-x__icon {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.contact-card-x__label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}

.contact-card-x__value {
  font-size: 1.05rem;
  font-weight: 600;
  word-break: break-word;
}

.contact-card-x__arrow {
  position: absolute;
  top: 24px;
  right: 22px;
  font-size: 1.4rem;
  opacity: 0.6;
  transition: all 0.3s var(--ease);
}

.contact-card-x:hover .contact-card-x__arrow {
  opacity: 1;
  transform: translateX(4px);
}

.contact-card-x--static {
  opacity: 0.85;
  cursor: default;
}

/* =========================================================
   BACK TO TOP
   ========================================================= */

.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 28px rgba(234, 88, 12, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  transition: all 0.4s var(--ease);
  z-index: 40;
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-top:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 16px 36px rgba(234, 88, 12, 0.5);
}

.back-to-top:active {
  transform: translateY(0) scale(0.95);
}

/* =========================================================
   FOCUS STYLES — accessibility
   ========================================================= */

*:focus {
  outline: none;
}

*:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

.btn:focus-visible,
.nav-link:focus-visible,
.drawer__link:focus-visible,
.contact-card-x:focus-visible,
.hero__contact-item:focus-visible,
.footer__btn:focus-visible,
.back-to-top:focus-visible {
  outline-offset: 4px;
}

/* =========================================================
   FOOTER
   ========================================================= */

.footer {
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  padding: 28px 0;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer__actions {
  display: flex;
  gap: 8px;
}

.footer__btn {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s var(--ease);
  text-decoration: none;
}

.footer__btn svg {
  width: 14px; height: 14px;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.footer__btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}

/* =========================================================
   REVEAL ANIMATIONS
   ========================================================= */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.9s var(--ease);
}

.reveal[data-reveal="left"] {
  transform: translateX(40px);
}

.reveal[data-reveal="right"] {
  transform: translateX(-40px);
}

.reveal.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* =========================================================
   RESPONSIVE — multi breakpoints
   1200px / 1024px / 880px / 720px / 560px / 420px
   ========================================================= */

/* Large desktop adjustments */
@media (max-width: 1200px) {
  .hero__inner {
    gap: 40px;
  }

  .stack-grid {
    gap: 16px;
  }
}

/* Tablet landscape */
@media (max-width: 1024px) {
  :root {
    --container: 100%;
  }

  .topbar__inner {
    padding: 14px 20px;
  }

  .nav-link {
    padding: 8px 10px;
    font-size: 0.85rem;
  }

  .nav-link span { display: none; }

  .hero__inner {
    grid-template-columns: 1fr 0.85fr;
    gap: 32px;
  }

  .hero__card {
    max-width: 320px;
  }

  .stack-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stack-card--wide {
    grid-column: span 2;
  }

  .timeline__card {
    padding: 28px 30px;
  }

  .profile {
    gap: 24px;
  }
}

/* Tablet portrait — single column hero */
@media (max-width: 880px) {
  .topbar__nav {
    display: none;
  }

  .topbar__burger {
    display: flex;
  }

  /* Hide CTA in topbar on mobile, burger takes its place */
  .topbar .btn {
    display: none;
  }

  .topbar__burger {
    margin-left: auto;
  }

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

  .hero__inner {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: left;
  }

  .hero__card {
    max-width: 280px;
    margin: 0 auto;
  }

  .hero__visual {
    width: 100%;
  }

  .profile {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 28px;
  }

  .stat:nth-child(2)::after,
  .stat:nth-child(4)::after {
    display: none;
  }

  .stat:nth-child(odd)::after {
    display: block;
  }

  .stack-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .section {
    padding: 64px 0;
  }
}

/* Mobile large */
@media (max-width: 720px) {
  .topbar__inner {
    padding: 12px 16px;
  }

  .topbar__brand-mark {
    width: 34px;
    height: 34px;
  }

  .topbar__brand-text {
    font-size: 0.9rem;
  }

  .drawer {
    top: 64px;
    left: 12px;
    right: 12px;
  }

  /* Hero card → smaller, badges hug closer to avatar */
  .hero__visual {
    display: flex;
    justify-content: center;
    position: relative;
  }

  .hero__card {
    max-width: 240px;
    aspect-ratio: 1;
  }

  .hero__badge {
    padding: 8px 12px;
    gap: 8px;
    animation-duration: 5s;
    transform: none !important;
  }

  .hero__badge strong {
    font-size: 0.85rem;
  }

  .hero__badge em {
    font-size: 0.72rem;
  }

  .hero__badge-icon {
    width: 30px;
    height: 30px;
    font-size: 1.1rem;
    border-radius: 8px;
  }

  .hero__badge--1 {
    top: -8px;
    left: -16px;
  }

  .hero__badge--2 {
    top: 32%;
    right: -16px;
  }

  .hero__badge--3 {
    bottom: -8px;
    left: -8px;
  }

  .hero__cta {
    gap: 10px;
  }

  .hero__cta .btn {
    flex: 1;
    min-width: 140px;
    justify-content: center;
  }

  .timeline {
    padding-left: 26px;
  }

  .timeline::before {
    left: 11px;
  }

  .timeline__dot {
    left: -26px;
    top: 24px;
    width: 24px;
    height: 24px;
  }

  .timeline__dot--secondary {
    left: -25px;
    width: 22px;
    height: 22px;
    top: 28px;
  }

  .timeline__dot--muted {
    left: -24px;
    width: 18px;
    height: 18px;
    top: 30px;
  }

  .timeline__card {
    padding: 24px 22px;
  }

  .timeline__role {
    font-size: 1.2rem;
  }

  .timeline__company {
    flex-wrap: wrap;
  }

  .bullet-list,
  .bullet-list--mini {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .strategy-grid {
    grid-template-columns: 1fr;
  }

  .stack-grid {
    grid-template-columns: 1fr;
  }

  .stack-card--wide {
    grid-column: span 1;
  }

  .stack-card {
    padding: 24px;
  }

  .formation {
    padding: 28px 22px;
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .formation__icon {
    width: 64px;
    height: 64px;
    font-size: 2.4rem;
  }

  .contact {
    padding: 56px 28px;
    border-radius: var(--radius-lg);
  }

  .contact__grid {
    grid-template-columns: 1fr;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
    gap: 14px;
  }
}

/* Mobile standard */
@media (max-width: 560px) {
  :root {
    --radius-lg: 20px;
    --radius-xl: 24px;
  }

  .container {
    padding: 0 16px;
  }

  .topbar__inner {
    padding: 10px 14px;
  }

  .topbar__brand-text {
    display: none;
  }

  .topbar__brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .topbar__burger {
    width: 44px;
    height: 44px;
  }

  .drawer {
    top: 60px;
    padding: 12px;
  }

  .drawer__link {
    padding: 14px;
    font-size: 0.95rem;
  }

  .scroll-progress {
    height: 2px;
  }

  .hero {
    padding: 24px 0 40px;
  }

  .hero__scroll {
    display: none;
  }

  .hero__status {
    font-size: 0.78rem;
    padding: 6px 12px;
  }

  .hero__title {
    font-size: clamp(2rem, 9vw, 2.8rem);
  }

  .hero__role {
    font-size: 1rem;
  }

  .hero__bio {
    font-size: 0.98rem;
  }

  .hero__cta {
    flex-direction: column;
    width: 100%;
  }

  .hero__cta .btn {
    width: 100%;
  }

  .hero__contact-item {
    font-size: 0.8rem;
    padding: 7px 12px;
  }

  .hero__card {
    max-width: 200px;
  }

  .hero__avatar-ring::before {
    inset: 0;
  }

  .hero__avatar {
    font-size: 2.6rem;
  }

  .hero__badge {
    padding: 7px 10px;
  }

  .hero__badge strong {
    font-size: 0.78rem;
  }

  .hero__badge em {
    font-size: 0.68rem;
  }

  .hero__badge-icon {
    width: 28px;
    height: 28px;
    font-size: 1rem;
  }

  .hero__badge--1 {
    top: -8px !important;
    left: -10px !important;
  }

  .hero__badge--2 {
    top: 30% !important;
    right: -10px !important;
  }

  .hero__badge--3 {
    bottom: -8px !important;
    left: -4px !important;
  }

  .stats {
    padding: 0 0 8px;
  }

  .stats__grid {
    padding: 22px 16px;
    gap: 18px 8px;
  }

  .stat__num {
    font-size: clamp(1.8rem, 8vw, 2.4rem);
  }

  .stat__label {
    font-size: 0.78rem;
  }

  .stat:not(:last-child)::after {
    display: none !important;
  }

  .section {
    padding: 56px 0;
  }

  .section__header {
    margin-bottom: 32px;
  }

  .section__title {
    font-size: clamp(1.7rem, 7vw, 2.2rem);
  }

  .section__sub {
    font-size: 0.95rem;
  }

  .section__eyebrow {
    font-size: 0.7rem;
    padding: 5px 12px;
  }

  .profile__main,
  .profile__side {
    padding: 24px 20px;
  }

  .profile__lead {
    font-size: 1.05rem;
  }

  .profile__main p {
    font-size: 0.95rem;
  }

  .profile__goal {
    padding: 16px 18px;
  }

  .timeline {
    margin-bottom: 40px;
    padding-left: 22px;
  }

  .timeline::before {
    left: 9px;
    top: 8px;
    bottom: 8px;
  }

  .timeline__dot {
    left: -22px;
    top: 22px;
    width: 20px;
    height: 20px;
    border-width: 2.5px;
  }

  .timeline__dot::before {
    inset: 3px;
  }

  .timeline__card {
    padding: 22px 20px;
    border-radius: 18px;
  }

  .timeline__date {
    font-size: 0.72rem;
    padding: 3px 10px;
  }

  .timeline__role {
    font-size: 1.1rem;
  }

  .timeline__company {
    font-size: 0.88rem;
  }

  .timeline__contract {
    font-size: 0.65rem;
  }

  .timeline__context {
    padding: 12px 14px;
    font-size: 0.88rem;
    margin: 14px 0 18px;
  }

  .timeline__sections {
    gap: 22px;
  }

  .timeline__heading {
    font-size: 0.78rem;
  }

  .bullet-list li,
  .achievement-list li {
    font-size: 0.9rem;
  }

  .achievement-list li {
    padding: 10px 14px;
  }

  .strategy {
    padding: 14px 16px;
  }

  .key-skill {
    font-size: 0.85rem;
    padding: 10px 16px;
  }

  .stack-card {
    padding: 22px 20px;
  }

  .stack-card h3 {
    font-size: 1.05rem;
  }

  .stack-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .stack-card__list li {
    font-size: 0.88rem;
  }

  .stack-card__chips span {
    font-size: 0.85rem;
    padding: 7px 14px;
  }

  .formation {
    padding: 28px 22px;
  }

  .formation__title {
    font-size: 1.4rem;
  }

  .formation__text {
    font-size: 0.93rem;
  }

  .contact {
    padding: 48px 24px;
  }

  .contact__title {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
  }

  .contact__sub {
    font-size: 0.95rem;
    margin-bottom: 28px;
  }

  .contact-card-x {
    padding: 20px 18px;
  }

  .contact-card-x__icon {
    font-size: 1.4rem;
  }

  .contact-card-x__value {
    font-size: 0.95rem;
  }

  .contact-card-x__arrow {
    top: 20px;
    right: 18px;
    font-size: 1.2rem;
  }

  .contact-section {
    padding-bottom: 60px;
  }

  .footer {
    padding: 22px 0;
  }
}

/* Reduce decorative shapes on smaller devices */
@media (max-width: 720px) {
  .shape--1 { width: 320px; height: 320px; opacity: 0.35; }
  .shape--2 { width: 360px; height: 360px; opacity: 0.35; }
  .shape--3 { width: 280px; height: 280px; opacity: 0.35; }
  .shape-grid { background-size: 24px 24px; }

  /* Disable expensive backdrop-filter on mobile for perf */
  .stats__grid,
  .profile__main,
  .profile__side,
  .hero__contact-item,
  .key-skill,
  .footer__btn,
  .footer {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* Tiny screens — under 420px */
@media (max-width: 420px) {
  .container {
    padding: 0 14px;
  }

  .hero__title {
    font-size: clamp(1.7rem, 9vw, 2.2rem);
  }

  .hero__line {
    font-size: 0.95rem;
  }

  .hero__bio {
    font-size: 0.92rem;
  }

  .hero__contact-item {
    font-size: 0.75rem;
    padding: 6px 10px;
    gap: 6px;
  }

  .hero__contact-item svg {
    width: 12px;
    height: 12px;
  }

  .hero__card {
    max-width: 180px;
  }

  .hero__badge {
    display: none !important;
  }

  /* Show stat-like cards instead of overlapping badges on tiny screens */
  .hero__visual::after {
    content: "3+ ans · 100 utilisateurs · 10+ firewalls";
    display: block;
    text-align: center;
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 500;
    margin-top: -4px;
  }

  .stats__grid {
    grid-template-columns: 1fr 1fr;
    padding: 18px 14px;
    gap: 16px 4px;
  }

  .stat__num {
    font-size: 1.6rem;
  }

  .stat__label {
    font-size: 0.72rem;
    line-height: 1.3;
  }

  .timeline {
    padding-left: 18px;
  }

  .timeline__dot {
    left: -18px;
    width: 16px;
    height: 16px;
    border-width: 2px;
  }

  .timeline__dot--secondary {
    left: -17px;
    width: 14px;
    height: 14px;
  }

  .timeline__dot--muted {
    left: -16px;
    width: 12px;
    height: 12px;
  }

  .timeline::before {
    left: 7px;
  }

  .timeline__card {
    padding: 20px 18px;
  }

  .timeline__role {
    font-size: 1rem;
  }

  .timeline__date {
    margin-bottom: 10px;
  }

  .stack-card {
    padding: 20px 18px;
  }

  .stack-card__head {
    gap: 12px;
    margin-bottom: 14px;
  }

  .contact {
    padding: 40px 20px;
  }

  .contact-card-x {
    padding: 18px 16px;
  }

  .footer__btn {
    font-size: 0.78rem;
    padding: 8px 14px;
  }

  .back-to-top {
    width: 42px;
    height: 42px;
    bottom: 16px;
    right: 16px;
  }

  .back-to-top svg {
    width: 18px;
    height: 18px;
  }
}

/* =========================================================
   PRINT
   ========================================================= */

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .topbar, .footer, .scroll-progress, .bg-shapes, .loader,
  .hero__scroll, .drawer, .topbar__burger, .hero__cta {
    display: none !important;
  }

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

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

  .section { padding: 30px 0; page-break-inside: avoid; }

  .stack-grid { grid-template-columns: repeat(2, 1fr); }

  .timeline__card, .stack-card, .profile__main, .profile__side,
  .formation, .contact, .stats__grid {
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .contact {
    background: var(--bg-soft) !important;
    color: var(--text) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .contact__title, .contact__sub, .contact-card-x,
  .contact-card-x__label, .contact-card-x__value {
    color: var(--text) !important;
  }

  .gradient-text, .stat__num {
    -webkit-text-fill-color: var(--primary) !important;
    color: var(--primary) !important;
  }

  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

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

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