/* =========================================================
   PORTFOLIO — RICO KAPORAL
   Thème dark premium : noir profond, verre, lumière.
   Inspiré de Linear / Vercel / Stripe.
   ========================================================= */

:root {
  /* --- Couleurs --- */
  --bg: #05060a;
  --bg-2: #0a0c12;
  --bg-3: #0e1118;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f6fb;
  --text-dim: #a6adbb;
  --text-faint: #6b7385;

  /* --- Accents (dégradé gris / argent) --- */
  --silver: #e4e4e7;
  --gray-light: #d4d4d8;
  --gray: #a1a1aa;
  --gray-dark: #52525b;
  --blue: var(--silver);
  --violet: var(--gray);
  --cyan: var(--gray-light);
  --gradient: linear-gradient(120deg, #fafafa, #a1a1aa, #52525b);
  --gradient-soft: linear-gradient(120deg, rgba(250, 250, 250, 0.35), rgba(161, 161, 170, 0.35), rgba(82, 82, 91, 0.35));
  --glow-blue: rgba(212, 212, 216, 0.5);
  --glow-violet: rgba(161, 161, 170, 0.4);

  /* --- Typo --- */
  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* --- Layout --- */
  --max-width: 1120px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --header-h: 76px;
}

/* =========================================================
   RESET & BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; }

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

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--blue), var(--violet));
  border-radius: 8px;
  border: 3px solid var(--bg);
}

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

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

/* =========================================================
   FOND DYNAMIQUE — halos + grille + grain
   ========================================================= */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.halo {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}

.halo-1 {
  width: 60vw; height: 60vw;
  top: -18vw; right: -12vw;
  background: radial-gradient(circle, rgba(228, 228, 231, 0.25), transparent 65%);
  animation: halo-drift 22s ease-in-out infinite alternate;
}

.halo-2 {
  width: 50vw; height: 50vw;
  bottom: -16vw; left: -10vw;
  background: radial-gradient(circle, rgba(161, 161, 170, 0.2), transparent 65%);
  animation: halo-drift 28s ease-in-out infinite alternate-reverse;
}

.halo-3 {
  width: 34vw; height: 34vw;
  top: 40%; left: 55%;
  background: radial-gradient(circle, rgba(212, 212, 216, 0.12), transparent 65%);
  animation: halo-drift 32s ease-in-out infinite alternate;
}

@keyframes halo-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(4vw, -3vh, 0) scale(1.12); }
}

/* grille fine façon blueprint */
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(80% 60% at 50% 0%, black, transparent 85%);
}

/* grain subtil */
.bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* =========================================================
   CURSEUR — lumière qui suit la souris
   ========================================================= */
.cursor-light {
  position: fixed;
  top: 0; left: 0;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(212, 212, 216, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.5s ease;
  will-change: transform;
}

.cursor-light.is-visible { opacity: 1; }

@media (hover: none) {
  .cursor-light { display: none; }
}

/* =========================================================
   SCROLL PROGRESS
   ========================================================= */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  z-index: 300;
  background: var(--gradient);
  background-size: 200% 100%;
  animation: gradient-slide 6s ease infinite;
  transition: width 0.12s ease-out;
}

@keyframes gradient-slide {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* =========================================================
   NAVBAR
   ========================================================= */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 100;
  display: flex;
  align-items: center;
  background: rgba(5, 6, 10, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

/* navbar qui évolue au scroll */
.navbar.scrolled {
  background: rgba(5, 6, 10, 0.75);
  border-bottom-color: var(--border);
  box-shadow: 0 12px 40px -18px rgba(0, 0, 0, 0.7);
}

.nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.logo-dot {
  color: var(--cyan);
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
  .logo-dot {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-dim);
  position: relative;
  transition: color 0.25s ease;
}

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

.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -7px;
  width: 100%;
  height: 1px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }

.nav-link.active { color: var(--text); }

.nav-link-cta {
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 9px 20px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.nav-link-cta::after { display: none; }

.nav-link-cta:hover {
  border-color: var(--blue);
  box-shadow: 0 0 22px -6px var(--glow-blue);
  background: rgba(212, 212, 216, 0.08);
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  z-index: 110;
}

.burger span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

/* --- Compteur de vues (en haut à droite) --- */
.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.visit-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 15px;
  background: var(--surface);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  user-select: none;
}

.visit-chip:hover {
  border-color: var(--border-strong);
  background: var(--surface-strong);
}

.visit-chip-icon {
  color: var(--cyan);
  flex: none;
  display: flex;
}

.visit-chip-count {
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  min-width: 3ch;
}

.visit-chip-label {
  color: var(--text-faint);
}

/* petit "pop" quand une nouvelle visite est comptée */
.visit-chip.pulse .visit-chip-count {
  animation: chip-pop 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes chip-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.3); color: var(--cyan); }
  100% { transform: scale(1); }
}

/* =========================================================
   BOUTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
  will-change: transform;
}

.btn-primary {
  background: var(--gradient);
  background-size: 160% 160%;
  animation: gradient-slide 6s ease infinite;
  color: #05060a;
  font-weight: 600;
  box-shadow: 0 10px 34px -12px var(--glow-blue);
}

.btn-primary:hover {
  box-shadow: 0 16px 48px -12px var(--glow-violet);
  transform: translateY(-2px) scale(1.02);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  border-color: var(--blue);
  box-shadow: 0 0 26px -8px var(--glow-blue);
  transform: translateY(-2px);
}

.btn-arrow {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-ghost:hover .btn-arrow { transform: translateX(5px); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-h) + 40px);
  padding-bottom: 60px;
  overflow: hidden;
}

/* halo dédié derrière le titre */
.hero::before {
  content: "";
  position: absolute;
  top: 8%; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 500px;
  background: radial-gradient(ellipse, rgba(228, 228, 231, 0.12), transparent 65%);
  filter: blur(40px);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
  width: 100%;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 18px;
  background: var(--surface);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  margin-bottom: 34px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(212, 212, 216, 0.55);
  animation: status-pulse 2.2s ease-out infinite;
}

@keyframes status-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(212, 212, 216, 0.5); }
  70%  { box-shadow: 0 0 0 9px rgba(212, 212, 216, 0); }
  100% { box-shadow: 0 0 0 0 rgba(212, 212, 216, 0); }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.6rem, 9vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0 0 30px;
}

.hero-line { display: block; }

.gradient-text {
  color: var(--cyan);
  animation: gradient-slide 7s ease infinite;
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
  .gradient-text {
    background: var(--gradient);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.hero-period { color: var(--cyan); }

.hero-sub {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--cyan);
  margin: 0 0 18px;
}

.hero-desc {
  color: var(--text-dim);
  font-size: 1.08rem;
  max-width: 46ch;
  margin: 0 0 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}

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

.hero-meta-item {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}

/* --- Vitrine glass : terminal --- */
.hero-visual {
  position: relative;
  z-index: 2;
}

.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 30px 80px -30px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative;
}

/* reflet en haut du verre */
.glass-card::before {
  content: "";
  position: absolute;
  top: 0; left: 8%; right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  pointer-events: none;
}

.terminal {
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.t-dot { width: 10px; height: 10px; border-radius: 50%; }
.t-red { background: #ff5f56; }
.t-yellow { background: #ffbd2e; }
.t-green { background: #27c93f; }

.terminal-title {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
}

.terminal-body {
  padding: 26px 22px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.9;
  min-height: 240px;
}

.term-line { margin: 0; color: var(--text); }
.term-output { margin: 0 0 12px; color: var(--text-dim); }

.term-prompt {
  color: var(--cyan);
  margin-right: 8px;
}

.term-cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--cyan);
  vertical-align: -2px;
  animation: blink 1s steps(1) infinite;
}

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

/* --- chips flottants autour du terminal --- */
.float-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text);
  background: rgba(10, 12, 18, 0.65);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 10px 18px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 14px 40px -14px rgba(0, 0, 0, 0.8);
  animation: float-y 6s ease-in-out infinite;
  z-index: 3;
}

.float-chip .chip-icon { color: var(--cyan); }

.float-chip-1 { top: -26px; right: 4%; animation-delay: 0s; }
.float-chip-2 { bottom: 12%; left: -8%; animation-delay: -2s; }
.float-chip-3 { top: 30%; right: -7%; animation-delay: -4s; }

/* conteneur du parallax des chips (évite le conflit avec float-y) */
.chips-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  will-change: transform;
}

@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

/* --- scroll hint --- */
.scroll-hint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 2;
}

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

.scroll-hint-line {
  display: block;
  width: 1px;
  height: 42px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  position: relative;
}

.scroll-hint-line::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 45%;
  background: var(--gradient);
  animation: scrollpulse 1.8s ease-in-out infinite;
}

@keyframes scrollpulse {
  0%   { transform: translateY(-120%); }
  100% { transform: translateY(260%); }
}

/* =========================================================
   SECTIONS GÉNÉRALES
   ========================================================= */
.section {
  position: relative;
  padding: 130px 0;
}

.section-alt {
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(161, 161, 170, 0.07), transparent 65%),
    linear-gradient(180deg, rgba(10, 12, 18, 0.5), rgba(5, 6, 10, 0));
}

.section-head {
  margin-bottom: 64px;
}

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

.section-eyebrow::before {
  content: "";
  width: 30px;
  height: 1px;
  background: var(--cyan);
  opacity: 0.6;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}

/* =========================================================
   À PROPOS
   ========================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 60px;
  align-items: start;
}

.about-text p {
  color: var(--text-dim);
  font-size: 1.08rem;
  margin: 0 0 22px;
}

.about-text strong {
  color: var(--cyan);
  font-weight: 600;
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
  .about-text strong {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.about-card {
  padding: 32px;
}

.about-card-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 8px;
}

.about-card-line {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0 0 6px;
}

.about-card-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* =========================================================
   ATOUTS
   ========================================================= */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.feature-card {
  padding: 34px 30px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
}

.feature-card:hover {
  border-color: var(--border-strong);
  box-shadow:
    0 30px 70px -30px rgba(0, 0, 0, 0.85),
    0 0 46px -16px var(--glow-blue);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 22px;
  color: var(--silver);
  filter: drop-shadow(0 0 14px var(--glow-blue));
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 10px;
}

.feature-card p {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin: 0;
}

/* =========================================================
   PROJETS
   ========================================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.project-card {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
}

.project-card:hover {
  border-color: var(--border-strong);
  box-shadow:
    0 30px 70px -30px rgba(0, 0, 0, 0.85),
    0 0 46px -16px var(--glow-violet);
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.project-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
}

.project-status {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid;
}

.status-private {
  color: var(--cyan);
  border-color: rgba(212, 212, 216, 0.35);
  background: rgba(212, 212, 216, 0.07);
}

.status-soon {
  color: var(--violet);
  border-color: rgba(161, 161, 170, 0.4);
  background: rgba(161, 161, 170, 0.08);
}

.project-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0;
}

/* Carte Bot Discord Vinted : logo en fond recouvrant toute la carte */
.project-card-vinted {
  background-image:
    linear-gradient(180deg, rgba(5, 6, 10, 0.52) 0%, rgba(5, 6, 10, 0.78) 100%),
    url('vinted_logo.png');
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.project-desc {
  color: var(--text-dim);
  font-size: 0.94rem;
  margin: 0;
  flex-grow: 1;
}

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

.project-tags span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 13px;
  background: rgba(255, 255, 255, 0.02);
}

/* =========================================================
   STATISTIQUES
   ========================================================= */
.section-stats {
  background:
    radial-gradient(50% 60% at 50% 50%, rgba(228, 228, 231, 0.08), transparent 70%),
    var(--bg);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat {
  padding: 20px 10px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--cyan);
  animation: gradient-slide 7s ease infinite;
  display: inline-block;
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
  .stat-value {
    background: var(--gradient);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.stat-label {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* =========================================================
   SHOWCASE — grande image avec parallax
   ========================================================= */
.section-showcase {
  overflow: hidden;
}

.showcase-media {
  position: relative;
  height: 54vh;
  min-height: 360px;
  max-width: 1200px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 40px 100px -40px rgba(0, 0, 0, 0.9);
}

/* image en fond, bien centrée avec échelle agrandie pour le parallax */
.showcase-image {
  position: absolute;
  inset: 0;
  background: url('background2.avif') center / cover no-repeat;
  will-change: transform;
  transition: transform 0.1s linear;
}

.showcase-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 6, 10, 0.15) 0%, rgba(5, 6, 10, 0.75) 100%),
    linear-gradient(90deg, rgba(5, 6, 10, 0.35), transparent 60%);
}

.showcase-caption {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 48px;
}

.showcase-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--cyan);
  margin: 0 0 14px;
}

.showcase-text {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  max-width: 26ch;
  margin: 0;
}

/* =========================================================
   STACK
   ========================================================= */
.stack-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stack-row {
  display: grid;
  grid-template-columns: 200px 1fr 130px;
  align-items: center;
  gap: 24px;
  padding: 20px 26px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.stack-row:hover {
  border-color: var(--border-strong);
  background: var(--surface-strong);
  transform: translateX(6px);
}

.stack-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
}

.stack-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.stack-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--gradient);
  background-size: 200% 100%;
  animation: gradient-slide 6s ease infinite, stack-grow 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  transform-origin: left;
  transform: scaleX(0);
  width: var(--w);
}

@keyframes stack-grow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

.fill-90 { --w: 90%; animation-delay: 0.1s; }
.fill-80 { --w: 80%; animation-delay: 0.2s; }
.fill-70 { --w: 70%; animation-delay: 0.3s; }
.fill-55 { --w: 55%; animation-delay: 0.4s; }
.fill-45 { --w: 45%; animation-delay: 0.5s; }

.stack-level {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  text-align: right;
  text-transform: lowercase;
}

/* =========================================================
   PARCOURS (journey)
   ========================================================= */
.journey {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 720px;
}

.journey::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: linear-gradient(180deg, var(--blue), var(--violet), transparent);
  opacity: 0.5;
}

.journey-item {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: start;
  gap: 20px;
}

.journey-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 2px solid var(--border-strong);
  margin-top: 22px;
  position: relative;
  z-index: 1;
}

.journey-dot.dot-active {
  border-color: var(--cyan);
  box-shadow: 0 0 0 5px rgba(212, 212, 216, 0.15), 0 0 18px rgba(212, 212, 216, 0.35);
}

.journey-card {
  padding: 26px 30px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease;
}

.journey-card:hover {
  border-color: var(--border-strong);
  transform: translateX(6px);
}

.journey-step {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 8px;
}

.journey-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 8px;
}

.journey-card p:last-child {
  color: var(--text-dim);
  margin: 0;
}

/* =========================================================
   CTA FINAL
   ========================================================= */
.section-cta {
  padding-bottom: 150px;
}

.cta-panel {
  padding: 80px 40px;
  text-align: center;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  top: -40%; left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(228, 228, 231, 0.12), transparent 65%);
  filter: blur(40px);
  pointer-events: none;
}

.cta-panel .section-eyebrow { justify-content: center; }
.cta-panel .section-eyebrow::before { display: none; }

.cta-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 20px;
}

.cta-desc {
  color: var(--text-dim);
  font-size: 1.1rem;
  max-width: 46ch;
  margin: 0 auto 40px;
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  background: rgba(5, 6, 10, 0.6);
  backdrop-filter: blur(10px);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* =========================================================
   BACK TO TOP
   ========================================================= */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 1.05rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  z-index: 90;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 24px -6px var(--glow-blue);
}

/* =========================================================
   ANIMATIONS AU SCROLL (reveal)
   ========================================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1180px) {
  /* laisser de la place au compteur de vues */
  .nav-links { gap: 22px; }
}

@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; gap: 80px; }
  .hero-visual { max-width: 560px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(300px, 82vw);
    background: rgba(5, 6, 10, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 30px;
    padding: 40px 34px;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 105;
  }

  .nav-links.open { transform: translateX(0); }

  .burger { display: flex; }

  .hero { padding-top: calc(var(--header-h) + 20px); }
  .hero-title { font-size: clamp(3rem, 13vw, 4.4rem); }
  .hero-desc { font-size: 1rem; }

  .float-chip-2 { left: -2%; }
  .float-chip-3 { right: -2%; }

  .section { padding: 90px 0; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .features-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .stack-row { grid-template-columns: 1fr; gap: 12px; }
  .stack-level { text-align: left; }
  .cta-panel { padding: 60px 26px; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .hero-meta { justify-content: flex-start; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .float-chip { display: none; }
  .section-eyebrow::before { display: none; }
  .visit-chip-label { display: none; }
  .visit-chip { padding: 8px 12px; }
}

/* =========================================================
   ACCESSIBILITÉ — réduction des animations
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .halo, .float-chip, .cursor-light { animation: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .stack-fill { transform: scaleX(1) !important; }
}
