/* =========================
   DESIGN TOKENS
========================= */
:root {
  --bg: #0f1115;
  --surface: #161a22;
  --surface-2: #1c2230;
  --text: #e6e6e6;
  --muted: #a0a8b8;
  --primary: #ff6b4a;
  --secondary: #a78bfa;
  --accent: #db5d38;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --vh: 1vh;
}

/* LIGHT THEME */
:root[data-theme="light"] {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f0f2f8;
  --surface-light: rgba(255, 255, 255, 0.7);
  --text: #1b1f2a;
  --muted: #4b5565;
  --primary: #ff5a3c;
  --secondary: #6d28d9;
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* =========================
   BASE
========================= */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
  overscroll-behavior-y: none;
}

body {
  padding-top: 94px;
  color: var(--muted);
  background: radial-gradient(1200px 800px at 20% 0%, rgba(255, 107, 74, 0.08), transparent 60%), var(--bg);
  letter-spacing: -0.01em;
  overscroll-behavior-y: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 991.98px) {
  body {
    padding-top: 0;
    padding-left: 17rem;
  }
}

/* =========================
   TYPOGRAPHY
========================= */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  text-transform: none;
}

h1 {
  font-size: clamp(2.8rem, 4vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
}

@media (max-width: 768px) {
  h1 {
    font-size: clamp(2.4rem, 3.6vw, 4.5rem);
  }
}

h2 {
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 2rem;
}

h3 {
  color: var(--text);
  font-size: clamp(1.4rem, 2vw, 2rem);
  line-height: 1.25;
  font-weight: 700;
  opacity: 0.95;
}

p,
li {
  color: var(--muted);
  line-height: 1.6;
  font-size: 1.02rem;
}

p.lead {
  font-size: 1.15rem;
  font-weight: 400;
}

@media (max-width: 768px) {
  p.lead {
    display: none;
  }
}

.subheading {
  text-transform: uppercase;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.subheading i {
  font-size: 1.3rem;
  color: var(--secondary);
  opacity: 0.95;
}

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

@media (max-width: 768px) {
  .subheading {
    font-size: 1rem;
    letter-spacing: 0.08em;
  }
}

/* =========================
   TITLES
========================= */

.section-title {
  display: flex;
  align-items: center;
  gap: 14px;

  font-size: clamp(1.6rem, 2.2vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;

  color: var(--text);

  position: relative;
  margin-bottom: 3rem;
}

/* icône plus “signature” */
.section-title i {
  font-size: 1.4rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;

  width: 42px;
  height: 42px;

  border-radius: 12px;

  background: rgba(255, 107, 74, 0.10);
  border: 1px solid rgba(255, 107, 74, 0.2);

  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* petite ligne décorative */
.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -14px;

  width: 80px;
  height: 2px;

  background: linear-gradient(90deg, var(--primary), transparent);
  border-radius: 999px;
}

/* =========================
   GLASS EFFECT
========================= */
.glass {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  contain: paint;
}

:root[data-theme="light"] .glass {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* =========================
   LAYOUT / SECTIONS
========================= */
section.resume-section {
  min-height: calc(var(--vh, 1vh) * 100);
  max-width: 1100px;
  margin: auto;
  padding: 6rem 2rem;
}

@media (min-width: 768px) {
  section.resume-section {
    min-height: 100vh;
  }
}

@media (min-width: 991.98px) {
  section.resume-section {
    padding: 3rem !important;
  }
}

/* =========================
   SIDENAV
========================= */

/* -------------------------
   BASE
------------------------- */
#sideNav {
  border-right: 1px solid var(--border);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* -------------------------
   THEMES
------------------------- */
:root[data-theme="dark"] #sideNav {
  background: rgba(22, 26, 34, 0.72) !important;
}

:root[data-theme="light"] #sideNav {
  background: linear-gradient(180deg,
      rgba(255, 255, 255, 0.9),
      rgba(248, 250, 252, 0.82)) !important;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06), inset -1px 0 0 var(--surface-light);
}

:root[data-theme="light"] #sideNav::after {
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

/* -------------------------
   NAV ELEMENTS
------------------------- */
#sideNav .navbar-brand {
  color: var(--text);
}

#sideNav .navbar-toggler {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
}

#sideNav .navbar-toggler i {
  color: var(--text);
  transition: 0.2s ease;
}

#sideNav .navbar-toggler:hover i {
  color: var(--primary);
}

#sideNav .navbar-toggler:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 107, 74, 0.25), 0 0 18px rgba(255, 107, 74, 0.18);
  border-radius: 12px;
}

#sideNav .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 20px;
  border-radius: 12px;
  color: var(--text);
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: all 0.2s ease;
  position: relative;
}

/* icône */
#sideNav .nav-link i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  color: var(--muted);
  transition: all 0.2s ease;
}

/* hover state */
#sideNav .nav-link:hover {
  background: rgba(255, 107, 74, 0.08);
  transform: translateX(3px);
}

#sideNav .nav-link:hover i {
  color: var(--primary);
  transform: scale(1.1);
}

/* active state */
#sideNav .nav-link.active {
  color: var(--primary);
  background: rgba(255, 107, 74, 0.12);
}

#sideNav .nav-link.active i {
  color: var(--primary);
}

#sideNav .nav-link.active::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  border-radius: 999px;
  background: var(--primary);
  opacity: 0.9;
}

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

.mobile-avatar img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;

  border: 1px solid rgba(255, 107, 74, 0.35);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.mobile-info {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.mobile-name {
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.mobile-role {
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.85;
}

/* -------------------------
   DESKTOP
------------------------- */
@media (min-width: 991.98px) {
  #sideNav {
    border-radius: 0 24px 24px 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    left: 0;
    position: fixed;
    text-align: center;
    top: 0;
    width: 17rem;

    .navbar-brand {
      display: flex;
      margin: auto auto 0;
      padding: 0.5rem;
    }

    .profile-wrapper {
      padding: 1.5rem 1rem;
      margin-bottom: 1rem;
      text-align: center;
    }

    .profile-img {
      width: 140px;
      height: 140px;
      border-radius: 50%;

      object-fit: cover;

      border: 2px solid rgba(255, 255, 255, 0.12);

      box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.35),
        inset 0 0 0 1px rgba(255, 255, 255, 0.08);

      transition: transform 0.3s ease, box-shadow 0.3s ease;
      cursor: zoom-in;
    }

    .profile-img:hover {
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 107, 74, 0.25);
    }

    .profile-img.zoomed {
      transform: scale(1.8);
      cursor: zoom-out;
      z-index: 9999;
      position: relative;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    }

    .profile-name {
      display: block;
      margin-top: 1rem;
      color: var(--text);
      font-size: 0.95rem;
      font-weight: 700;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      opacity: 0.9;
    }

    .profile-role::after {
      content: "";
      display: block;
      width: 42px;
      height: 2px;
      margin: 0.8rem auto 0;
      border-radius: 999px;
      background: linear-gradient(90deg, transparent, var(--primary), transparent);
    }

    .profile-role {
      font-size: 0.85rem;
      color: var(--muted);
      opacity: 0.9;
    }

    .navbar-collapse {
      align-items: flex-start;
      display: flex;
      flex-direction: column;
      flex-grow: 0;
      margin-bottom: auto;
      width: 100%;
    }

    .navbar-collapse .navbar-nav {
      flex-direction: column;
      width: 100%;
    }
  }
}

/* -------------------------
   MOBILE / TABLET
------------------------- */
@media (max-width: 991.98px) {
  #sideNav {
    border: 1px solid var(--border);
    border-radius: 18px;
    height: auto;
    left: 12px;
    padding: 0.65rem 1rem;
    position: fixed;
    right: 12px;
    top: 12px;
    width: auto;
    z-index: 9998;
  }

  :root[data-theme="dark"] #sideNav {
    background: rgba(22, 26, 34, 0.78) !important;
  }

  :root[data-theme="light"] #sideNav {
    background: rgba(255, 255, 255, 0.88) !important;
  }

  #sideNav .navbar-brand {
    margin: 0;
    padding: 0;
  }

  #sideNav .navbar-toggler {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    height: 42px;
  }

  :root[data-theme="light"] #sideNav .navbar-toggler {
    background: rgba(0, 0, 0, 0.04);
  }

  #sideNav .navbar-collapse {
    animation: mobileMenuIn 0.25s ease;
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-top: 1rem;
    padding: 1rem;
  }

  :root[data-theme="dark"] #sideNav .navbar-collapse {
    background: rgba(28, 34, 48, 0.9);
  }

  :root[data-theme="light"] #sideNav .navbar-collapse {
    background: rgba(255, 255, 255, 0.92);
  }

  #sideNav .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    padding: 0.9rem 1rem;
    margin-bottom: 0.4rem;
    transition: all 0.2s ease;
  }

  #sideNav .nav-link.active::before {
    display: none;
  }

  #sideNav .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    color: var(--muted);
  }

  #sideNav .nav-link:hover,
  #sideNav .nav-link.active {
    background: rgba(255, 107, 74, 0.12);
    color: var(--primary);
    transform: none;
  }

  #sideNav .nav-link:hover i,
  #sideNav .nav-link.active i {
    color: var(--primary);
  }

  #sideNav .nav-link.active {
    box-shadow: inset 3px 0 0 var(--primary), 0 0 20px rgba(255, 107, 74, 0.12);
    transform: scale(0.98);
  }

  #sideNav .collapsing {
    overflow: hidden;
    transition: height 0s !important;
  }

  #sideNav .collapse.show {
    animation: mobileMenuIn 0.25s ease;
  }
}

/* =========================
   CARDS
========================= */
.resume-item {
  border-radius: var(--radius);
  color: var(--text);
  margin-bottom: 2rem;
  position: relative;
  padding: 2rem;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  transition: transform .2s ease, border .2s ease, background .2s ease;
}

.resume-item::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.02));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.resume-item::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle, rgba(255, 107, 74, 0.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.resume-item:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(255, 107, 74, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

.resume-item:hover::after {
  opacity: 1;
}

.resume-item p,
.resume-item li {
  color: var(--muted);
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.job-header h3 {
  margin-bottom: 0.3rem;
}

.job-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.job-meta .company {
  color: var(--primary);
  font-weight: 600;
}

.job-meta .date {
  opacity: 0.8;
}

.company-logo {
  width: 70px;
  height: 70px;
  object-fit: contain;
  padding: 8px;
  border-radius: 12px;
  background: rgb(255, 255, 255);
  border: 1px solid var(--border);
}

:root[data-theme="dark"] .company-logo {
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 var(--surface-light);
}

.company-logos.overlay {
  position: relative;
  width: 90px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-main img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  border-radius: 10px;
  background: rgb(255, 255, 255);
  border: 1px solid var(--border);
  padding: 6px;
  z-index: 1;
  position: relative;
}

.logo-client {
  position: absolute;
  bottom: -17px;
  right: -17px;
  z-index: 2;
  background: rgb(255, 255, 255);
  border-radius: 10px;
  padding: 3px;
  border: 1px solid var(--border);
}

.logo-client:hover {
  transition: transform 0.2s ease;
  transform: scale(1.7);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.logo-client img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
}

@media (max-width: 768px) {
  .job-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .job-meta {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .company-logo,
  .company-logos.overlay {
    align-self: center;
    margin: 0.5rem auto 0;
  }
}

.job-summary {
  margin: 1.5rem 0 1.75rem;
  line-height: 1.75;
}

.resume-content h5 {
  margin-top: 1.8rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.5;
}

.job-list-wrapper {
  overflow: hidden;
  height: 135px;
  position: relative;
  transition: height 0.4s ease;
  -webkit-mask-image: linear-gradient(to bottom, black 75%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 75%, transparent 100%);
  transform: translateZ(0);
  backface-visibility: hidden;
  contain: paint;
}

.job-list-wrapper.expanded {
  -webkit-mask-image: none;
  mask-image: none;
}

.job-list-wrapper.closing {
  transition: none !important;
}

.job-list {
  padding-left: 1.2rem;
  margin-bottom: 1.5rem;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.job-list li {
  margin-bottom: 0.65rem;
  line-height: 1.65;
  opacity: 1;
  transform: translateY(0);
  transition: transform 0.35s ease, opacity 0.35s ease;
  will-change: transform, opacity;
}

.job-list li::marker {
  color: var(--primary);
}

.job-toggle {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(255, 107, 74, 0.08);
  border: 1px solid rgba(255, 107, 74, 0.25);
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
}

.job-toggle:hover {
  transform: translateY(-2px);
  background: rgba(255, 107, 74, 0.15);
  border-color: var(--primary);
  box-shadow: 0 10px 25px rgba(255, 107, 74, 0.2);
}

.job-toggle::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(255, 107, 74, 0.25), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.job-toggle:hover::before {
  opacity: 1;
}

/* =========================
   ENVIRONMENT TAG BADGES
========================= */
.environment {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.env-label {
  color: var(--text);
  font-weight: 600;
  margin-right: 6px;
}

/* TAG BASE */
.env-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.12), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(167, 139, 250, 0.25);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.env-tag:hover {
  transform: translateY(-2px);
  border-color: var(--secondary);
  box-shadow: 0 8px 25px var(--shadow);
  color: var(--secondary);
}

.env-tag::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(167, 139, 250, 0.2), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.env-tag:hover::before {
  opacity: 1;
}

:root[data-theme="light"] .env-tag {
  background: var(--surface-light);
}

/* =========================
   INFO BLOCK
========================= */
.info-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.info-item i {
  width: 20px;
  text-align: center;
  color: var(--primary);
  flex-shrink: 0;
}

.info-item a {
  color: var(--muted);
  text-decoration: none;
}

.info-item a:hover {
  color: var(--primary);
}

/* =========================
   EXPERIENCE STATS
========================= */
.experience-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.stat-item {
  flex: 1;
  min-width: 150px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  text-align: center;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.stat-item:hover {
  transform: translateY(-4px);
  border-color: var(--secondary);
  box-shadow: 0 10px 30px rgba(167, 139, 250, 0.15);
}

.stat-item i {
  font-size: 1.4rem;
  color: var(--secondary);
  margin-bottom: 8px;
}

.stat-value {
  display: block;
  font-weight: 800;
  color: var(--text);
  font-size: 1.1rem;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
}

:root[data-theme="light"] .stat-item {
  background: var(--surface-light);
}

/* =========================
   LINKS / ICONS BLOCKS
========================= */
.links-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 2rem;
}

.link-element {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.link-element:hover {
  transform: translateY(-3px);
  border-color: var(--secondary);
  box-shadow: 0 10px 30px rgba(167, 139, 250, 0.15);
}

.link-element i {
  color: var(--secondary);
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.link-element:hover i {
  transform: translate(2px, -2px);
}

.link-content {
  display: flex;
  flex-direction: column;
}

.link-title {
  font-weight: 700;
  color: var(--text);
}

.link-subtitle {
  font-size: 0.85rem;
  color: var(--muted);
}

:root[data-theme="light"] .link-element {
  background: var(--surface-light);
}

/* =========================
   SCROLL HINT
========================= */
.scroll-hint {
  position: absolute;
  bottom: 24px;
  left: calc(50% + 8.5rem);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.scroll-hint i {
  font-size: 1.2rem;
  color: var(--secondary);
  animation: bounceDown 1.6s infinite;
}

/* hover interaction */
.scroll-hint:hover {
  color: var(--text);
  opacity: 1;
}

.scroll-hint:hover i {
  color: var(--secondary);
}

@media (max-width: 991.98px) {
  .scroll-hint {
    left: 50%;
  }
}

@media (max-width: 768px) {
  .scroll-hint {
    display: none;
  }
}

/* =========================
   TIMELINE
========================= */
.timeline {
  position: relative;
  max-width: 1140px;
  margin: 0 auto;
  padding: 15px 0;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 2px;
  background: var(--accent);
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.timeline-container {
  position: relative;
  width: 50%;
  padding: 15px 30px;
}

.timeline-container .date {
  display: inline-flex;
  align-items: center;
  margin-bottom: 16px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary);
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.12), rgba(167, 139, 250, 0.04));
  border: 1px solid rgba(167, 139, 250, 0.2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  width: fit-content;
}

.timeline-container.left {
  left: 0;
}

.timeline-container.right {
  left: 50%;
}

.timeline-container li::marker {
  color: var(--primary);
}

.timeline-container::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  border: 2px solid var(--accent);
  border-radius: 50%;
}

.timeline-container.left::after {
  right: -7px;
}

.timeline-container.right::after {
  left: -7px;
}

.timeline-container::before {
  content: '';
  position: absolute;
  width: 30px;
  height: 2px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--accent);
}

.timeline-container.left::before {
  right: 0;
}

.timeline-container.right::before {
  left: 0;
}

.timeline-container .content {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 25px;
  color: var(--text);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.timeline-container .content:hover {
  transform: translateY(-6px) scale(1.01);
  border: 1px solid rgba(255, 107, 74, 0.35);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 107, 74, 0.08), 0 0 30px rgba(255, 107, 74, 0.12);
}

:root[data-theme="light"] .timeline-container .content {
  background: var(--surface-light);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

:root[data-theme="light"] .timeline-container .content:hover {
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(255, 90, 60, 0.08);
}

.timeline-container .content h2 {
  color: var(--primary);
  font-size: 18px;
  margin-bottom: 10px;
}

@media (max-width: 768px) {
  .timeline::after {
    left: 20px;
  }

  .timeline-container {
    width: 100%;
    padding-left: 50px;
    padding-right: 20px;
  }

  .timeline-container.left,
  .timeline-container.right {
    left: 0;
  }

  .timeline-container.left::before,
  .timeline-container.right::before {
    left: 20px;
  }

  .timeline-container.left::after,
  .timeline-container.right::after {
    left: 13px;
  }
}

/* =========================
   EDUCATION CARDS
========================= */
.education-card {
  padding: 2rem;
}

.education-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.education-header h4 {
  margin-bottom: 0.4rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.education-header h5 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.5;
}

.education-header h5 i {
  color: var(--secondary);
  margin-right: 0.5rem;
}

.education-date {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(255, 107, 74, 0.08);
  border: 1px solid rgba(255, 107, 74, 0.15);
  white-space: nowrap;
}

.education-grade {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .education-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .education-date {
    align-self: center;
    margin-top: 0.75rem;
  }
}

/* =========================
   SKILLS SECTION
========================= */
.skills-section {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.skill-block {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.skill-block:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.skills-section .subheading {
  font-size: 1rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
  display: flex;
  align-items: center;
}

.skills-section .subheading i {
  color: var(--secondary);
}

.dev-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.dev-icons .list-inline-item {
  margin: 0;
}

.dev-icons .list-inline-item i:hover {
  color: var(--primary);
}

.dev-icons i {
  font-size: 3rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.dev-icons i:hover {
  transform: translateY(-4px) scale(1.08);
}

.language-list li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.language-list {
  list-style: none;
  padding-left: 0;
}

.language-list li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.language-list .icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
}

/* =========================
   INTEREST SECTION
========================= */

.interest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 1.5rem 0;
}

.interest-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.interest-card i {
  color: var(--secondary);
  font-size: 1.1rem;
}

.interest-card span {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}

.interest-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.interest-text {
  margin-top: 1rem;
  line-height: 1.7;
}

/* =========================
   UTILITIES
========================= */
a {
  color: var(--primary);
  transition: 0.2s ease;
}

a:hover {
  opacity: 0.8;
}

.bg-primary {
  background: var(--surface) !important;
}

.fa-check {
  color: #0BCD0B;
}

/* =========================
   COMPONENTS
========================= */
.progress_bar {
  height: 3px;
  background: linear-gradient(90deg, #ff6b4a, #ff9966, #ff6b4a);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  transform: translateX(-100%);
}

/* =========================
   THEME TOGGLE
========================= */
.theme-toggle {
  position: fixed;
  top: 15px;
  right: 15px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 16px 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  cursor: pointer;
  z-index: 9999;
  color: var(--text);
  transition: transform 0.25s ease, background 0.25s ease;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.theme-toggle-label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--text);
  opacity: 0.9;
}

:root[data-theme="dark"] .theme-toggle {
  background: var(--surface);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.03), 0 0 18px rgba(167, 139, 250, 0.08);
}

:root[data-theme="light"] .theme-toggle {
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.theme-toggle:hover {
  transform: scale(1.05);
  background: var(--surface-2);
}

.theme-toggle:focus {
  outline: none;
}

.theme-toggle:focus-visible {
  box-shadow: 0 0 0 3px rgba(245, 197, 66, 0.35);
}

.theme-toggle i {
  font-size: 1.1rem;
  transition: transform 0.25s ease;
}

:root[data-theme="dark"] .theme-toggle i {
  color: #ff8c00;
}

:root[data-theme="light"] .theme-toggle i {
  color: #f5c542;
}

@media (max-width: 991.98px) {
  .theme-toggle {
    top: auto;
    bottom: 20px;
    left: 20px;
    width: 52px;
    height: 52px;
  }

  .theme-toggle-label {
    display: none;
  }
}

/* =========================
   REVEAL MODE
========================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s cubic-bezier(.22, 1, .36, 1), transform .8s cubic-bezier(.22, 1, .36, 1);
}

.reveal.visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {

  .reveal,
  .reveal.visible {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}

/* =========================
   TOP ARROW (MODERN)
========================= */
.top-arrow {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  text-decoration: none;
  cursor: pointer;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  will-change: transform, opacity;
  z-index: 9999;
}

/* icon */
.top-arrow i {
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

/* hover */
.top-arrow:hover {
  background: var(--surface-2);
  color: var(--primary);
  text-decoration: none;
  transform: translateY(-2px);
}

.top-arrow:hover i {
  transform: translateY(-2px);
}

/* visible state (JS toggle) */
.top-arrow.show {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

/* mobile */
@media (max-width: 768px) {
  .top-arrow {
    width: 52px;
    height: 52px;
    right: 16px;
    bottom: 16px;
  }
}

@media (hover: none) {
  .top-arrow:hover {
    background: var(--surface);
    color: var(--text);
    transform: none;
  }
}

/* =========================
   ICON COLORS
========================= */
.angular-color {
  color: #B13138;
}

.sass-color {
  color: #CD6799;
}

.js-color {
  color: #E5A228;
}

.css3-color {
  color: #0170BA;
}

.html5-color {
  color: #E54C21;
}

.npm-color {
  color: #CC3534;
}

.yarn-color {
  color: #368FB9;
}

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

/* =========================
   ANIMATIONS
========================= */
@keyframes mobileMenuIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes bounceDown {

  0%,
  100% {
    transform: translateY(0);
    opacity: 0.7;
  }

  50% {
    transform: translateY(6px);
    opacity: 1;
  }
}

/* =========================
   Mobile optimization
========================= */
/* will-change uniquement pendant l'interaction, pas en permanence */
.resume-item:hover,
.timeline-container .content:hover {
  will-change: transform;
}

/* Désactiver backdrop-filter sur mobile (trop coûteux) */
@media (max-width: 991.98px) {

  #sideNav,
  .theme-toggle,
  .timeline-container .content {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  /* Compenser visuellement avec une opacité plus forte */
  :root[data-theme="dark"] #sideNav {
    background: rgba(22, 26, 34, 0.96) !important;
  }

  :root[data-theme="light"] #sideNav {
    background: rgba(255, 255, 255, 0.97) !important;
  }
}

/* Désactiver les transitions de transform sur touch */
@media (hover: none) {

  .resume-item:hover,
  .interest-card:hover,
  .stat-item:hover,
  .env-tag:hover,
  .job-toggle:hover,
  .link-element:hover {
    transform: none;
    box-shadow: inherit;
    will-change: auto;
  }
}

/* touch-action sur tous les éléments interactifs */
a,
button,
.nav-link,
.job-toggle,
.top-arrow,
.env-tag {
  touch-action: manipulation;
}

/* content-visibility sur sections hors-écran */
#experience,
#timeline,
#education,
#skills,
#interests {
  content-visibility: auto;
  contain-intrinsic-size: 0 800px;
}