/* ==========================================================================
   THOMAS GIRAUD - SYSTEMS & NETWORKS PORTFOLIO STYLESHEET
   Style inspired by codedgar.com (terminal-editorial layout)
   ========================================================================== */

/* --- 1. FONTS & RESET --- */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&family=Outfit:wght@300;400;500;700;900&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  /* Fonts */
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Colors (Light Theme Default) */
  --bg-primary: #f4f4f4;
  --bg-secondary: #fbfbfb;
  --bg-tertiary: #ebdcc9; /* sand-ish beige */
  --text-primary: #191818;
  --text-secondary: rgba(25, 24, 24, 0.7);
  --text-tertiary: rgba(25, 24, 24, 0.45);
  --text-inverse: #f4f4f4;
  --border-color: rgba(25, 24, 24, 0.12);
  --border-subtle: rgba(25, 24, 24, 0.06);
  --surface-subtle: rgba(25, 24, 24, 0.03);
  --surface-card: #f9f8f6;
  
  --color-blue: #1b5def;
  --color-blue-subtle: rgba(27, 93, 239, 0.08);
  --color-orange: #e25327;
  --color-orange-subtle: rgba(226, 83, 39, 0.08);
  --color-green: #15803d;
  --color-green-subtle: rgba(21, 128, 61, 0.08);
  --color-red: #ff5f57;
  --color-yellow: #ffbd2e;
  
  /* Layout */
  --container-max: 1200px;
  --container-pad: 32px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 80px;
  --space-10: 96px;

  /* Transitions & Anim */
  --motion-fast: 0.16s;
  --motion-medium: 0.24s;
  --motion-slow: 0.32s;
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out-soft: cubic-bezier(0, 0, 0.2, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.05);

  --z-sticky: 100;
  --z-nav: 999;
  --z-overlay: 1000;
  --z-modal: 9000;
  --z-cursor: 9998;
  --z-noise: 9999;
}

/* --- Dark Theme Override --- */
[data-theme="dark"] {
  --bg-primary: #0a0b0d;
  --bg-secondary: #111215;
  --bg-tertiary: #1b1d22;
  --text-primary: #f4f4f4;
  --text-secondary: rgba(244, 244, 244, 0.7);
  --text-tertiary: rgba(244, 244, 244, 0.45);
  --text-inverse: #191818;
  --border-color: rgba(244, 244, 244, 0.12);
  --border-subtle: rgba(244, 244, 244, 0.06);
  --surface-subtle: rgba(244, 244, 244, 0.03);
  --surface-card: #15171b;
  
  --color-blue: #4a7ff7;
  --color-blue-subtle: rgba(74, 127, 247, 0.12);
  --color-orange: #e8734b;
  --color-orange-subtle: rgba(232, 115, 75, 0.12);
  --color-green: #2ecc71;
  --color-green-subtle: rgba(46, 204, 113, 0.12);

  --shadow-sm: 0 1px 4px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 18px rgba(0,0,0,0.25);
  --shadow-lg: 0 12px 36px rgba(0,0,0,0.35);
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  scroll-behavior: smooth;
  transition: background-color var(--motion-medium) var(--ease-standard), color var(--motion-medium) var(--ease-standard);
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  padding-bottom: 40px; /* Space for bottom status bar */
}

/* Selection */
::selection {
  background-color: var(--color-blue);
  color: var(--bg-primary);
}

/* --- 2. PREMIUM RETRO EFFECTS --- */
/* Breathing Dot Grid Background */
.dot-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1; /* Behind all content, but in front of body background */
  background-image: radial-gradient(
    var(--border-color) 1.5px, 
    transparent 1.5px
  );
  background-size: 24px 24px;
  background-position: 12px 12px;
  opacity: 0.15;
  animation: dot-breathe 8s ease-in-out infinite alternate;
}

@keyframes dot-breathe {
  0% { opacity: 0.08; }
  100% { opacity: 0.22; }
}

/* Noise Texture overlay */
.noise-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  content: "";
  opacity: 0.035;
  pointer-events: none;
  z-index: var(--z-noise);
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3联%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Scanline Effect */
.scanline {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.05) 50%
  ), linear-gradient(
    90deg,
    rgba(255, 0, 0, 0.02),
    rgba(0, 255, 0, 0.01),
    rgba(0, 0, 255, 0.02)
  );
  background-size: 100% 4px, 6px 100%;
  pointer-events: none;
  z-index: var(--z-noise);
  opacity: 0.15;
}
[data-theme="dark"] .scanline {
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.15) 50%
  ), linear-gradient(
    90deg,
    rgba(255, 0, 0, 0.04),
    rgba(0, 255, 0, 0.02),
    rgba(0, 0, 255, 0.04)
  );
  background-size: 100% 4px, 6px 100%;
}

/* --- 3. CUSTOM CURSOR (DESKTOP) --- */
.custom-cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background-color: var(--color-orange);
  border-radius: 50%;
  pointer-events: none;
  z-index: var(--z-cursor);
  transform: translate(-50%, -50%);
  transition: transform 0.08s ease;
}

.custom-cursor-ring {
  position: fixed;
  width: 32px;
  height: 32px;
  border: 1px solid var(--color-blue);
  border-radius: 50%;
  pointer-events: none;
  z-index: var(--z-cursor);
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, border-color var(--motion-fast);
}

/* Interactive cursor hover state */
body.cursor-hovering .custom-cursor {
  transform: translate(-50%, -50%) scale(1.5);
  background-color: var(--color-blue);
}
body.cursor-hovering .custom-cursor-ring {
  width: 48px;
  height: 48px;
  border-color: var(--color-orange);
  border-width: 2px;
}

/* Disable custom cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
  .custom-cursor, .custom-cursor-ring {
    display: none !important;
  }
}

/* --- 4. TYPOGRAPHY & BUTTONS --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

p {
  color: var(--text-secondary);
}

a {
  color: var(--color-blue);
  text-decoration: none;
  transition: color var(--motion-fast) var(--ease-standard);
}
a:hover {
  color: var(--text-primary);
}

/* Inline text link underlined effect */
.text-link {
  position: relative;
  font-weight: 600;
}
.text-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--motion-medium) var(--ease-standard);
}
.text-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Tech annotations style */
.system-annotation {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
  text-transform: lowercase;
}
.system-annotation--muted {
  color: var(--text-tertiary);
}
.system-annotation--accent {
  color: var(--color-orange);
}
.system-annotation--blue {
  color: var(--color-blue);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  border: 1px solid var(--border-color);
  background-color: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--motion-fast) var(--ease-standard);
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background-color: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
}
.btn--primary:hover {
  background-color: transparent;
  color: var(--text-primary);
  box-shadow: 0 4px 15px var(--color-blue-subtle);
}

.btn--secondary {
  background-color: transparent;
  color: var(--text-primary);
  border-color: var(--border-color);
}
.btn--secondary:hover {
  border-color: var(--color-blue);
  color: var(--color-blue);
  background-color: var(--surface-subtle);
}

.btn--large {
  padding: 18px 36px;
  font-size: var(--text-md);
}

/* --- 5. TOP NAV BAR --- */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  user-select: none;
}

.top-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  background-color: rgba(244, 244, 244, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--motion-medium), border-color var(--motion-medium);
}
[data-theme="dark"] .top-nav__inner {
  background-color: rgba(10, 11, 13, 0.8);
}

.top-nav__wordmark {
  display: flex;
  align-items: center;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
}
.top-nav__wordmark span {
  color: var(--color-blue);
  transition: color var(--motion-fast);
}
.top-nav__wordmark:hover span {
  color: var(--color-orange);
}

.top-nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
}

.top-nav__link {
  position: relative;
  display: flex;
  align-items: center;
  padding: 6px 12px;
  color: var(--text-secondary);
  text-transform: none;
  transition: color var(--motion-fast) var(--ease-standard);
}
.top-nav__link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  background-color: var(--color-blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--motion-medium) var(--ease-out-soft);
}
.top-nav__link:hover::after,
.top-nav__link.is-active::after {
  transform: scaleX(1);
}
.top-nav__link:hover {
  color: var(--text-primary);
}
.top-nav__link.is-active {
  color: var(--text-primary);
  font-weight: 700;
}
.top-nav__link.is-active::after {
  background-color: var(--color-orange);
}

/* Burger Mobile button */
.top-nav__burger {
  display: none;
  background: transparent;
  border: 1px solid var(--border-color);
  cursor: pointer;
  padding: 10px;
  border-radius: 4px;
  align-items: center;
  justify-content: center;
  transition: border-color var(--motion-fast), background-color var(--motion-fast);
}
.top-nav__burger:hover {
  border-color: var(--color-blue);
  background-color: var(--color-blue-subtle);
}
.top-nav__burger-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 16px;
}
.top-nav__burger-icon span {
  display: block;
  height: 2px;
  background-color: var(--text-primary);
  transition: transform var(--motion-fast), opacity var(--motion-fast);
}

/* Mobile Nav Drawer Overlay */
.top-nav__overlay {
  position: fixed;
  inset: 0;
  background-color: var(--bg-primary);
  z-index: var(--z-nav);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-8);
  transform: translateX(100%);
  transition: transform 0.4s var(--ease-out-expo);
}
.top-nav__overlay.is-open {
  transform: translateX(0);
}

.top-nav__overlay-header {
  position: absolute;
  top: var(--space-5);
  left: var(--space-6);
  right: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-nav__overlay-title {
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  font-size: var(--text-sm);
}

.top-nav__overlay-close {
  background: transparent;
  border: none;
  font-size: 32px;
  color: var(--text-primary);
  cursor: pointer;
}

.top-nav__overlay-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin-top: var(--space-8);
}

.top-nav__overlay-link {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: none;
  transition: color var(--motion-fast), padding-left var(--motion-fast);
}
.top-nav__overlay-link:hover,
.top-nav__overlay-link.is-active {
  color: var(--color-blue);
  padding-left: var(--space-2);
}

/* --- 6. PAGE CONTAINER --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* General page section */
.page-section {
  padding: var(--space-10) 0;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}
.page-section--alt {
  background-color: var(--bg-secondary);
}

.section-number__text {
  font-family: var(--font-mono);
  font-size: 72px;
  font-weight: 900;
  color: var(--border-color);
  position: absolute;
  top: var(--space-6);
  right: var(--container-pad);
  line-height: 1;
  user-select: none;
  opacity: 0.5;
}

.section-title {
  font-size: var(--text-xxl);
  font-weight: 900;
  margin-bottom: var(--space-2);
  letter-spacing: -0.03em;
}
.section-title::before {
  content: "// ";
  color: var(--color-orange);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 680px;
  margin-bottom: var(--space-7);
}

/* --- 7. SECTION 01: HERO --- */
.hero {
  min-height: 90vh;
  display: grid;
  grid-template-columns: 55% 45%;
  gap: var(--space-6);
  align-items: center;
  padding-top: 120px;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.hero__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 3;
}

.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 3;
}

.hero__visual svg {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 0 24px var(--color-blue-subtle));
  animation: 6s ease-in-out infinite alternate float-svg;
}

@keyframes float-svg {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-10px) rotate(1.2deg); }
}

.hero__micro-hook {
  margin-bottom: var(--space-4);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.hero__title {
  font-size: var(--text-3xl);
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-bottom: var(--space-3);
  line-height: 1.1;
}

.hero__greeting {
  display: block;
  font-size: var(--text-xl);
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.hero__name {
  color: var(--text-primary);
}

.hero__role {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  color: var(--color-blue);
  margin-bottom: var(--space-4);
  font-weight: 600;
}

.hero__tagline {
  font-size: 20px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
}

.hero__actions {
  display: flex;
  gap: var(--space-4);
}

/* --- 8. SECTION 02: THE PROBLEM --- */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  margin-bottom: var(--space-7);
}

.problem-card {
  padding: var(--space-5);
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  transition: all var(--motion-medium) var(--ease-standard);
  position: relative;
}
.problem-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-blue);
  box-shadow: var(--shadow-md);
}

.problem-card__index {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-orange);
  margin-bottom: var(--space-2);
  display: block;
}

.problem-card__title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.problem-card__text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.problems-cta {
  font-size: var(--text-md);
  color: var(--text-primary);
  font-weight: 500;
  border-left: 3px solid var(--color-blue);
  padding-left: var(--space-4);
  max-width: 780px;
  margin-top: var(--space-6);
}

/* --- 9. SECTION 03: WHO I AM (ABOUT) --- */
.about-layout {
  display: grid;
  grid-template-columns: 55% 45%;
  gap: var(--space-8);
  align-items: center;
}

.about-preview__lead {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: var(--space-5);
}

.about-preview__text {
  margin-bottom: var(--space-6);
}

.counters-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}

.counter-card {
  padding: var(--space-4);
  background-color: var(--surface-card);
  border: 1px solid var(--border-subtle);
  text-align: center;
}

.animated-counter__value {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-xxl);
  font-weight: 900;
  color: var(--color-blue);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.animated-counter__label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
}

.animated-counter__sublabel {
  display: block;
  font-size: var(--text-2xs);
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* --- 10. SECTION 04: WORK (PROJETS) --- */
.work-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.work-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  padding: var(--space-6);
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  transition: all var(--motion-medium) var(--ease-standard);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.work-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: var(--color-blue);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform var(--motion-medium) var(--ease-standard);
}

.work-card:hover {
  transform: translateX(8px);
  border-color: var(--color-blue);
  box-shadow: var(--shadow-md);
}
.work-card:hover::before {
  transform: scaleY(1);
}

.work-card__meta {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.work-card__year {
  font-weight: 700;
  color: var(--color-orange);
}

.work-card__role {
  font-size: 11px;
}

.work-card__content {
  display: flex;
  flex-direction: column;
}

.work-card__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.work-card__description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  max-width: 800px;
}

.work-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.work-card__tag {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  padding: 3px 8px;
  background-color: var(--color-blue-subtle);
  color: var(--color-blue);
  border-radius: 2px;
}

.work-card__cta {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-blue);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.work-card__cta .arrow {
  transition: transform var(--motion-fast);
}
.work-card:hover .work-card__cta .arrow {
  transform: translateX(4px);
}

/* Card Glow Pulse */
.card-glow-pulse {
  position: relative;
  z-index: 1;
}
.card-glow-pulse::after {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(90deg, var(--color-blue), transparent, var(--color-orange));
  z-index: -1;
  opacity: 0;
  transition: opacity var(--motion-medium);
  background-size: 200% 200%;
}
.card-glow-pulse:hover::after {
  opacity: 0.15;
  animation: 3s linear infinite glow-rotate;
}

@keyframes glow-rotate {
  0% { background-position: 0% 50% }
  50% { background-position: 100% 50% }
  100% { background-position: 0% 50% }
}

/* --- 11. SECTION 05: SERVICES (COMPÉTENCES) --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

.service-card {
  padding: var(--space-6);
  border: 1px solid var(--border-color);
  background-color: var(--surface-card);
  transition: all var(--motion-medium) var(--ease-standard);
  text-decoration: none;
  color: inherit;
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-orange);
  box-shadow: var(--shadow-md);
}

.service-card__icon {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-orange);
  margin-bottom: var(--space-3);
  display: block;
}

.service-card__title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
  color: var(--text-primary);
}

.service-card__description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* --- 12. SECTION 06: INTERACTIVE CV --- */
.cv-preview-card {
  background-color: var(--surface-card);
  border: 1px solid var(--border-color);
  padding: var(--space-7);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.cv-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid var(--text-primary);
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-6);
}

.cv-header__title h3 {
  font-size: var(--text-xxl);
  letter-spacing: -0.02em;
}
.cv-header__title p {
  font-family: var(--font-mono);
  color: var(--color-blue);
  font-weight: 600;
  font-size: var(--text-sm);
}

.cv-header__contacts {
  text-align: right;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cv-grid {
  display: grid;
  grid-template-columns: 60% 40%;
  gap: var(--space-6);
}

.cv-section-title {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-orange);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: var(--space-1);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  font-weight: 700;
}

.cv-item {
  margin-bottom: var(--space-4);
}

.cv-item__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-2);
  margin-bottom: 4px;
}

.cv-item__title {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-primary);
}

.cv-item__date {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.cv-item__subtitle {
  font-style: italic;
  font-size: var(--text-sm);
  color: var(--color-blue);
  margin-bottom: 6px;
}

.cv-item__desc {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  padding-left: var(--space-3);
  position: relative;
}
.cv-item__desc::before {
  content: "•";
  position: absolute;
  left: 2px;
  color: var(--color-orange);
}

.cv-skill-group {
  margin-bottom: var(--space-4);
}

.cv-skill-group__name {
  font-size: var(--text-xs);
  font-weight: 700;
  margin-bottom: var(--space-2);
  text-transform: uppercase;
}

.cv-skill-bar {
  height: 4px;
  background-color: var(--border-color);
  position: relative;
  margin-bottom: var(--space-3);
}

.cv-skill-bar__fill {
  height: 100%;
  background-color: var(--color-blue);
  width: 0; /* Animated dynamically with JS */
  transition: width 1.5s var(--ease-out-expo);
}

.cv-actions {
  display: flex;
  justify-content: center;
  margin-top: var(--space-6);
}

/* --- 13. SECTION 07: CONTACT (CLI TERMINAL FORM) --- */
.contact-container {
  max-width: 720px;
  margin: 0 auto;
}

.contact-availability {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  margin-bottom: var(--space-4);
}

.availability-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-green);
  box-shadow: 0 0 10px var(--color-green);
  animation: 2s infinite blink;
}

@keyframes blink {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* Terminal style contact form */
.terminal-form {
  background-color: #121315;
  border: 1px solid #2e3035;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: #a9b2c3;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.terminal-form__header {
  background-color: #1a1b1e;
  padding: 10px var(--space-4);
  border-bottom: 1px solid #2e3035;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-form__dots {
  display: flex;
  gap: 6px;
}

.terminal-form__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.terminal-form__dot--red { background-color: var(--color-red); }
.terminal-form__dot--yellow { background-color: var(--color-yellow); }
.terminal-form__dot--green { background-color: var(--color-green); }

.terminal-form__title {
  font-size: 11px;
  color: #5c6370;
}

.terminal-form__body {
  padding: var(--space-4);
}

.terminal-form__output-line {
  margin-bottom: var(--space-3);
  color: #5c6370;
}

.terminal-form__input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--space-4);
  position: relative;
}

.terminal-form__prompt {
  color: #98c379; /* Green color for prompt */
  white-space: nowrap;
}

.terminal-form__field {
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: #e06c75; /* Salmon pink for typed input */
  width: 100%;
}
.terminal-form__field::placeholder {
  color: #3e4452;
}

.terminal-form__textarea {
  resize: none;
  height: 80px;
}

.terminal-form__submit {
  background-color: #2c313c;
  color: #abb2bf;
  border: 1px solid #3e4452;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  padding: 6px 16px;
  cursor: pointer;
  margin-top: var(--space-2);
  transition: all var(--motion-fast);
}
.terminal-form__submit:hover {
  background-color: var(--color-blue);
  color: white;
  border-color: var(--color-blue);
}

.terminal-form__success {
  color: #98c379;
  display: none;
  padding: var(--space-2) 0;
  border-top: 1px dashed #2e3035;
  margin-top: var(--space-4);
}

/* --- 14. FOOTER --- */
.site-footer {
  padding: var(--space-8) 0;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  position: relative;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 40% 60%;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.site-footer__brand {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-2);
  display: block;
}

.site-footer__tagline {
  color: var(--text-tertiary);
  display: block;
}

.site-footer__nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.site-footer__nav-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.site-footer__link--heading {
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
}

.site-footer__link {
  color: var(--text-secondary);
  text-transform: none;
  transition: color var(--motion-fast);
}
.site-footer__link:hover {
  color: var(--color-blue);
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-4);
  color: var(--text-tertiary);
}

.site-footer__legal {
  display: flex;
  gap: var(--space-2);
}

.site-footer__legal-link {
  color: var(--text-tertiary);
  transition: color var(--motion-fast);
}
.site-footer__legal-link:hover {
  color: var(--text-primary);
}

/* --- 15. BOTTOM STATUS BAR --- */
.status-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-overlay);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  user-select: none;
}

.status-bar__inner {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: 4px var(--space-4);
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  height: 28px;
}

.status-bar__segment {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  color: var(--text-secondary);
  height: 100%;
  border-right: 1px solid var(--border-subtle);
}

.status-bar__mode {
  background-color: var(--surface-subtle);
}
.status-bar__mode-label {
  color: var(--text-tertiary);
}
.status-bar__mode-value {
  color: var(--color-blue);
  font-weight: 700;
}

.status-bar__path {
  color: var(--text-primary);
  font-weight: 500;
}
.status-bar__path-prefix {
  color: var(--text-tertiary);
}

.status-bar__sysstatus {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.status-bar__sysstatus-dot {
  width: 6px;
  height: 6px;
  background-color: var(--color-green);
  border-radius: 50%;
}

.status-bar__spacer {
  flex: 1;
}

.status-bar__progress {
  display: flex;
  align-items: center;
  gap: 6px;
}
.status-bar__progress-bar {
  width: 48px;
  height: 3px;
  background-color: var(--border-color);
  overflow: hidden;
  position: relative;
}
.status-bar__progress-fill {
  height: 100%;
  width: 100%;
  background-color: var(--color-blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.1s linear;
}

.status-bar__time {
  font-variant-numeric: tabular-nums;
  border-right: none;
}

.status-bar__btn {
  background: transparent;
  border: none;
  border-left: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0 10px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--motion-fast), color var(--motion-fast);
}
.status-bar__btn:hover {
  background-color: var(--color-orange);
  color: var(--text-inverse);
}

/* --- 16. MODALS & OVERLAYS --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(25, 24, 24, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  z-index: var(--z-modal);
  display: flex;
  align-items: flex-start; /* Align near the top for scrolling support */
  justify-content: center;
  overflow-y: auto; /* Enable scroll if content is taller than screen */
  padding: var(--space-9) var(--space-4); /* Add spacing at top and bottom */
  pointer-events: none;
  transition: background-color 0.8s cubic-bezier(0.16, 1, 0.3, 1), backdrop-filter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-theme="dark"] .modal-overlay {
  background-color: rgba(0, 0, 0, 0);
}
.modal-overlay.is-open {
  background-color: rgba(25, 24, 24, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: auto;
}
[data-theme="dark"] .modal-overlay.is-open {
  background-color: rgba(0, 0, 0, 0.72);
}

.modal-content {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  width: 90%;
  max-width: 500px;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.05), var(--shadow-lg);
  transform: translateY(50px) scale(0.93);
  opacity: 0;
  transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s;
  overflow: hidden;
}
.modal-overlay.is-open .modal-content {
  transform: translateY(0) scale(1);
  opacity: 1;
  border-color: var(--color-blue);
  box-shadow: 0 0 30px var(--color-blue-subtle), var(--shadow-lg);
}

/* Staggered Boot Animations for Project Modals */
.project-modal .project-modal-details {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s;
}

.project-modal .project-modal-sidebar {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

.modal-overlay.is-open .project-modal-details {
  opacity: 1;
  transform: translateX(0);
}

.modal-overlay.is-open .project-modal-sidebar {
  opacity: 1;
  transform: translateX(0);
}

/* Modal Title typing animation cursor */
.modal-title::after {
  content: "▋";
  color: var(--color-orange);
  margin-left: 4px;
  animation: cursor-flash 1s infinite steps(2);
}

@keyframes cursor-flash {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.modal-header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-secondary);
}

.modal-title {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-orange);
}

.modal-close {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border-radius: 50%;
  background-color: var(--surface-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--motion-fast);
}
.modal-close:hover {
  background-color: var(--color-red);
  color: white;
  border-color: var(--color-red);
  box-shadow: 0 0 12px rgba(255, 95, 87, 0.4);
}

.modal-body {
  padding: var(--space-5);
}

/* Shortcuts styles */
.shortcuts-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-height: 380px;
  overflow-y: auto;
}

.shortcuts-group-title {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.shortcut-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  border-bottom: 1px dashed var(--border-subtle);
  padding-bottom: var(--space-2);
}

.shortcut-keys {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  background-color: var(--surface-subtle);
  border: 1px solid var(--border-color);
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 700;
  color: var(--color-blue);
}

.shortcut-desc {
  color: var(--text-secondary);
}

/* Settings Form Styles */
.settings-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.settings-option__label {
  font-weight: 600;
  font-size: var(--text-sm);
}

.settings-option__desc {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--border-color);
  transition: .3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--bg-primary);
  transition: .3s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--color-blue);
}

input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* Theme buttons group */
.theme-select-group {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.theme-btn {
  flex: 1;
  padding: 8px var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  border: 1px solid var(--border-color);
  background-color: var(--surface-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--motion-fast) var(--ease-standard);
  border-radius: 4px;
}
.theme-btn:hover {
  border-color: var(--color-blue);
  color: var(--color-blue);
  background-color: var(--color-blue-subtle);
}
.theme-btn.is-active {
  background-color: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
  font-weight: 700;
}

.modal-footer {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
}

/* --- 17. BACK TO TOP BUTTON --- */
.back-to-top {
  position: fixed;
  bottom: 40px;
  right: var(--space-6);
  z-index: var(--z-nav);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-1);
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.4s var(--ease-out-expo), opacity 0.4s;
}
.back-to-top.is-visible {
  transform: translateY(0);
  opacity: 1;
}
.back-to-top:hover {
  border-color: var(--color-blue);
  color: var(--color-blue);
}

/* --- 18. RESPONSIVE DESIGN --- */
@media (max-width: 1024px) {
  :root {
    --container-pad: 24px;
  }
  
  .about-layout {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

@media (max-width: 768px) {
  :root {
    --text-xxl: 28px;
    --text-3xl: 36px;
  }

  .hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Centrage vertical complet sur mobile */
    min-height: 80vh; /* Magnifique présence plein écran de l'introduction */
    padding-top: 100px;
    padding-bottom: var(--space-6);
    gap: var(--space-5);
    text-align: center;
  }

  .hero__visual {
    display: none !important; /* Masque le diagramme réseau uniquement sur mobile */
  }

  .hero__content {
    width: 100%;
    max-width: 540px; /* Largeur de lecture optimale */
    margin: 0 auto;
  }

  .hero__actions {
    justify-content: center;
  }

  .top-nav__links {
    display: none;
  }

  .top-nav__burger {
    display: flex;
  }

  .problem-grid,
  .services-grid,
  .cv-grid {
    grid-template-columns: 1fr;
  }

  .work-card {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }

  .work-card__meta {
    flex-direction: row;
    gap: var(--space-4);
    margin-bottom: var(--space-1);
  }

  .cv-header {
    flex-direction: column;
    gap: var(--space-3);
  }

  .cv-header__contacts {
    text-align: left;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }
  
  .site-footer__nav {
    grid-template-columns: 1fr 1fr;
  }
  
  .site-footer__bottom {
    flex-direction: column;
    gap: var(--space-3);
  }
}

@media (max-width: 480px) {
  :root {
    --container-pad: 16px;
    --text-3xl: 34px;
    --text-xxl: 26px;
  }
  
  .hero__actions {
    flex-direction: column;
    gap: var(--space-2);
  }
  
  .counters-grid {
    grid-template-columns: 1fr;
  }

  .status-bar__sysstatus-text {
    display: none;
  }
  
  .status-bar__progress-bar {
    display: none;
  }
}

/* ==========================================================================
   IMMERSED BACKGROUND ANIMATIONS (DATA RAIN & MINESWEEPER GRID)
   ========================================================================== */

/* Data Rain Canvas (Hero) */
.data-rain-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* Sits behind text content but overlaps background */
  pointer-events: none;
  overflow: hidden;
}

.data-rain-bg__canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Fades & Vignettes */
.bg-fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.bg-fade--radial {
  background: radial-gradient(circle at center, transparent 20%, var(--bg-primary) 85%);
}

.bg-fade--edges {
  background: 
    linear-gradient(to bottom, var(--bg-secondary) 0%, transparent 15%, transparent 85%, var(--bg-secondary) 100%),
    linear-gradient(to right, var(--bg-secondary) 0%, transparent 10%, transparent 90%, var(--bg-secondary) 100%);
}

/* Dynamic Network Constellation (Problem Section) */
.network-constellation-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.network-constellation-bg__canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* --- 19. CLICKABLE CV CONTACTS & HOBBIES & MODALS --- */
.cv-header__contacts a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color var(--motion-fast) var(--ease-standard), text-shadow var(--motion-fast);
}

.cv-header__contacts a i {
  color: var(--color-blue);
  font-size: 14px;
  transition: transform var(--motion-fast);
}

.cv-header__contacts a:hover {
  color: var(--color-blue);
  text-shadow: 0 0 8px var(--color-blue-subtle);
}

.cv-header__contacts a:hover i {
  transform: scale(1.15) translateY(-1px);
}

/* Hobbies / Interests tags */
.cv-interests-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.cv-interest-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background-color: var(--surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  transition: all var(--motion-fast) var(--ease-standard);
}

.cv-interest-tag i {
  color: var(--color-orange);
}

.cv-interest-tag:hover {
  border-color: var(--color-orange);
  color: var(--text-primary);
  background-color: var(--color-orange-subtle);
  transform: translateY(-2px);
}

/* Larger Modals for Project Labs Details */
.modal-content--large {
  max-width: 800px;
  width: 95%;
}

.project-modal-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-5);
}

.project-modal-details {
  display: flex;
  flex-direction: column;
}

.project-modal-subtitle {
  font-size: var(--text-lg);
  color: var(--text-primary);
  margin-bottom: var(--space-3);
  font-weight: 700;
}

.project-modal-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

.project-modal-bullets {
  list-style: none;
  margin-top: var(--space-3);
  padding-left: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.project-modal-bullets li {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  position: relative;
  padding-left: var(--space-4);
}

.project-modal-bullets li::before {
  content: "»";
  position: absolute;
  left: 0;
  color: var(--color-blue);
  font-weight: bold;
}

.project-modal-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.project-sidebar-card {
  background-color: var(--surface-subtle);
  border: 1px solid var(--border-color);
  padding: var(--space-4);
  border-radius: 4px;
}

.project-sidebar-title {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  display: block;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: var(--space-1);
  margin-bottom: var(--space-2);
}

@media (max-width: 768px) {
  .project-modal-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
}

/* --- 20. NEW CLEAN CONTACT FORM CARD --- */
.contact-card {
  background-color: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  max-width: 680px;
  margin: 0 auto;
  transition: transform var(--motion-medium), border-color var(--motion-medium);
}

.contact-card:hover {
  border-color: var(--color-blue);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.contact-form__row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

@media (max-width: 560px) {
  .contact-form__row {
    grid-template-columns: 1fr;
  }
}

.contact-form__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  text-align: left;
}

.contact-form__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-form__input {
  width: 100%;
  padding: 12px 16px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  outline: none;
  transition: border-color var(--motion-fast) var(--ease-standard), box-shadow var(--motion-fast) var(--ease-standard);
}

.contact-form__input::placeholder {
  color: var(--text-tertiary);
}

.contact-form__input:focus {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px var(--color-blue-subtle);
}

.contact-form__textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--space-2);
}

.contact-form__submit-btn {
  width: auto;
  min-width: 180px;
  font-weight: 600;
}

.contact-form__success {
  display: none;
  text-align: center;
  padding: var(--space-6) var(--space-4);
}

.success-icon-wrap {
  font-size: 48px;
  color: var(--color-green);
  margin-bottom: var(--space-3);
  animation: scaleUp 0.4s var(--ease-out-expo) both;
}

@keyframes scaleUp {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.contact-form__success h3 {
  font-size: var(--text-xl);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.contact-form__success p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* --- 21. PREMIUM VISUAL MICRO-ANIMATIONS SYSTEM --- */

/* Scroll Reveal Transitions */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.5s cubic-bezier(0.16, 1, 0.3, 1), transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Button Hover Neon Sweep Effect */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
  transform: skewX(-25deg);
  pointer-events: none;
  transition: none;
}

[data-theme="dark"] .btn::after {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.12),
    transparent
  );
}

.btn:hover::after {
  left: 150%;
  transition: left 0.85s var(--ease-standard);
}

/* Floating Active Nav / Section Numbers */
.section-number__text {
  animation: float-number 6s ease-in-out infinite alternate;
}

@keyframes float-number {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

/* Section Title Orange Prefix Breathing Animation */
.section-title::before {
  animation: prefix-blink 3s infinite alternate var(--ease-standard);
}

@keyframes prefix-blink {
  0% { opacity: 0.45; text-shadow: none; }
  100% { opacity: 1; text-shadow: 0 0 10px var(--color-orange); }
}

/* Counter Value Pop Animation at completion */
@keyframes pulse-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); color: var(--color-orange); }
  100% { transform: scale(1); }
}

.pulse-pop {
  animation: pulse-pop 0.5s var(--ease-out-expo) forwards;
}

/* Smooth Elevation for Service Cards */
.service-card {
  transition: transform var(--motion-medium) var(--ease-standard), border-color var(--motion-medium), box-shadow var(--motion-medium);
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--color-orange);
  box-shadow: var(--shadow-lg), 0 10px 20px var(--color-orange-subtle);
}

/* Smooth Elevation and side shifting for Work Cards */
.work-card {
  transition: transform var(--motion-medium) var(--ease-standard), border-color var(--motion-medium), box-shadow var(--motion-medium);
}

.work-card:hover {
  transform: translateY(-4px) translateX(8px);
  border-color: var(--color-blue);
  box-shadow: var(--shadow-lg), 0 8px 16px var(--color-blue-subtle);
}

/* --- 22. ACTIVE NAV GLOW & CV BOUNCE --- */

/* Active Link Glow Underline */
.top-nav__link.is-active::after {
  background-color: var(--color-orange);
  box-shadow: 0 0 10px var(--color-orange), 0 0 4px var(--color-orange);
}

/* Hover glow for top nav active words wordmark */
.top-nav__link:hover {
  text-shadow: 0 0 8px var(--color-blue-subtle);
}

/* CV Download Button Hover Scale & Bounce */
#download-cv-btn {
  transition: transform var(--motion-medium) var(--ease-out-expo), box-shadow var(--motion-medium) var(--ease-out-expo), background-color var(--motion-fast);
}

#download-cv-btn:hover {
  transform: scale(1.03) translateY(-1px);
  box-shadow: 0 10px 25px var(--color-blue-subtle);
}

#download-cv-btn i {
  transition: transform var(--motion-medium) var(--ease-out-expo);
}

#download-cv-btn:hover i {
  animation: download-bounce 1s infinite var(--ease-standard);
}

@keyframes download-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* --- 23. MEDIA QUERY COMPLÉMENTAIRE POUR LES MODALES SUR MOBILE --- */
@media (max-width: 560px) {
  .modal-overlay {
    padding: var(--space-4) var(--space-3); /* Espacement minimal haut/bas */
  }
  
  .modal-content {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
  }
  
  .modal-body {
    padding: var(--space-4);
  }
  
  .project-modal-subtitle {
    font-size: 16px;
  }
  
  .project-modal-text,
  .project-modal-bullets li {
    font-size: 13px;
  }
  
  .modal-footer {
    padding: var(--space-3) var(--space-4);
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
    text-align: center;
  }
  
  .modal-footer-tech-text {
    font-size: 10px;
    order: 2; /* Texte explicatif en bas */
  }
  
  .btn--close-modal {
    width: 100%;
    order: 1; /* Bouton de fermeture prioritaire (en haut dans la colonne) */
  }
}

/* --- 24. PREMIUM CONTINUOUS SKILL BAR SYSTEM --- */
.cv-skill-level {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  background-color: var(--color-blue-subtle);
  color: var(--color-blue);
  border-radius: 4px;
  border: 1px solid rgba(27, 93, 239, 0.15);
  text-transform: uppercase;
}
[data-theme="dark"] .cv-skill-level {
  background-color: rgba(74, 127, 247, 0.12);
  color: var(--color-blue);
  border-color: rgba(74, 127, 247, 0.2);
}

.cv-skill-bar {
  height: 3px;
  background-color: var(--border-color);
  border-radius: 1.5px;
  position: relative;
  margin-top: var(--space-2);
  margin-bottom: var(--space-4);
  overflow: hidden;
  width: 100%;
}
[data-theme="dark"] .cv-skill-bar {
  background-color: rgba(255, 255, 255, 0.08);
}

.cv-skill-bar__fill {
  height: 100%;
  background-color: var(--color-blue);
  border-radius: 1.5px;
  width: 0; /* Fallback */
  transition: all var(--motion-medium) cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 4px rgba(27, 93, 239, 0.25);
}

[data-theme="dark"] .cv-skill-bar__fill {
  box-shadow: 0 0 6px rgba(74, 127, 247, 0.4);
}

/* Micro-interactions: Active bars expand and glow brighter on hover */
.cv-skill-group {
  cursor: default;
}

.cv-skill-group:hover .cv-skill-bar__fill {
  background-color: #3080ff;
  box-shadow: 0 0 8px rgba(27, 93, 239, 0.5);
  transform: scaleY(1.4);
}

[data-theme="dark"] .cv-skill-group:hover .cv-skill-bar__fill {
  background-color: #5d93ff;
  box-shadow: 0 0 10px rgba(74, 127, 247, 0.75);
}

