:root {
  --bg: #050505;
  --primary: #00f2ff;
  --accent: #7000ff;
  --text: #ffffff;
  --text-dim: #a0a0a0;
  --glass: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.1);
}

/* Neutraliser les pseudos décoratifs pour éviter qu'ils bloquent les clics */
.loader-logo::before,
.progress-container::before,
.project-card::before,
.skill-category::before,
.timeline::before,
.modal-content::before {
  pointer-events: none;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Montserrat", sans-serif;
  overflow-x: hidden;
}

/* Prevent horizontal overflow on mobile */
html {
  overflow-x: hidden;
}

/* Background Grille */
.matrix-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: -2;
  mask-image: radial-gradient(circle at center, black, transparent 80%);
  transition: background-image 0.3s ease;
}

.glow-point {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 242, 255, 0.15), transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s;
}

/* Loader Ultra Moderne */
.loader {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #000000, #0a0a0a, #050505);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.loader-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.loader-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--primary);
  animation: particleFloat 3s infinite;
}

.loader-particle:nth-child(1) {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
  animation-duration: 4s;
}

.loader-particle:nth-child(2) {
  top: 60%;
  left: 80%;
  animation-delay: 0.5s;
  animation-duration: 3.5s;
}

.loader-particle:nth-child(3) {
  top: 80%;
  left: 20%;
  animation-delay: 1s;
  animation-duration: 3s;
}

.loader-particle:nth-child(4) {
  top: 40%;
  left: 90%;
  animation-delay: 1.5s;
  animation-duration: 4.5s;
}

.loader-particle:nth-child(5) {
  top: 10%;
  left: 50%;
  animation-delay: 2s;
  animation-duration: 3.2s;
}

.loader-particle:nth-child(6) {
  top: 30%;
  left: 15%;
  animation-delay: 0.3s;
  animation-duration: 3.8s;
}

.loader-particle:nth-child(7) {
  top: 70%;
  left: 85%;
  animation-delay: 0.8s;
  animation-duration: 3.4s;
}

.loader-particle:nth-child(8) {
  top: 50%;
  left: 30%;
  animation-delay: 1.2s;
  animation-duration: 4s;
}

.loader-particle:nth-child(9) {
  top: 25%;
  left: 75%;
  animation-delay: 1.8s;
  animation-duration: 3.6s;
}

.loader-particle:nth-child(10) {
  top: 65%;
  left: 50%;
  animation-delay: 2.3s;
  animation-duration: 3.3s;
}

.loader-particle:nth-child(11) {
  top: 15%;
  left: 60%;
  animation-delay: 0.6s;
  animation-duration: 3.9s;
}

.loader-particle:nth-child(12) {
  top: 55%;
  left: 12%;
  animation-delay: 1.1s;
  animation-duration: 4.2s;
}

.loader-particle:nth-child(13) {
  top: 75%;
  left: 65%;
  animation-delay: 1.7s;
  animation-duration: 3.5s;
}

.loader-particle:nth-child(14) {
  top: 35%;
  left: 88%;
  animation-delay: 2.1s;
  animation-duration: 3.7s;
}

.loader-particle:nth-child(15) {
  top: 45%;
  left: 42%;
  animation-delay: 2.5s;
  animation-duration: 3.1s;
}

@keyframes particleFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  50% {
    transform: translate(50px, -100px) scale(1.5);
    opacity: 0.8;
  }
  90% {
    opacity: 0.3;
  }
}

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

.loader-logo {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 900;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  gap: 5px;
  position: relative;
}

.loader-logo::before,
.loader-logo::after {
  content: "TIBO.TESSIER";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
}

.loader-logo::before {
  animation: glitch1 2s infinite;
}

.loader-logo::after {
  animation: glitch2 2s infinite;
}

@keyframes glitch1 {
  0%,
  90%,
  100% {
    opacity: 0;
  }
  92% {
    opacity: 0.8;
    transform: translateX(-50%) translate(-2px, -2px);
    filter: hue-rotate(90deg);
  }
}

@keyframes glitch2 {
  0%,
  85%,
  100% {
    opacity: 0;
  }
  87% {
    opacity: 0.8;
    transform: translateX(-50%) translate(2px, 2px);
    filter: hue-rotate(-90deg);
  }
}

.loader-logo .letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px) rotateX(-90deg);
  animation: letterDrop 0.6s forwards;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 20px rgba(0, 242, 255, 0.5);
}

.loader-logo .letter:nth-child(1) {
  animation-delay: 0.1s;
}
.loader-logo .letter:nth-child(2) {
  animation-delay: 0.2s;
}
.loader-logo .letter:nth-child(3) {
  animation-delay: 0.3s;
}
.loader-logo .letter:nth-child(4) {
  animation-delay: 0.4s;
}
.loader-logo .dot {
  animation-delay: 0.5s;
  color: var(--primary);
  opacity: 0;
  animation: letterDrop 0.6s forwards;
}
.loader-logo .letter:nth-child(6) {
  animation-delay: 0.6s;
}
.loader-logo .letter:nth-child(7) {
  animation-delay: 0.7s;
}
.loader-logo .letter:nth-child(8) {
  animation-delay: 0.8s;
}
.loader-logo .letter:nth-child(9) {
  animation-delay: 0.9s;
}
.loader-logo .letter:nth-child(10) {
  animation-delay: 1s;
}
.loader-logo .letter:nth-child(11) {
  animation-delay: 1.1s;
}
.loader-logo .letter:nth-child(12) {
  animation-delay: 1.2s;
}

@keyframes letterDrop {
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0);
  }
}

.loader-subtitle {
  font-size: 1.2rem;
  color: var(--text-dim);
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeInUp 0.8s forwards 1.3s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.progress-container {
  width: 300px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin: 0 auto 15px;
  position: relative;
  opacity: 1;
  animation: fadeInUp 0.8s forwards 1.5s;
}

.progress-container::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 242, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 10px;
  transition: width 0.3s ease;
  box-shadow: 0 0 20px var(--primary);
  position: relative;
}

.progress-bar::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 10px #fff;
}

.loader-percentage {
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 10px;
  opacity: 1;
  animation: pulse 2s infinite;
  text-shadow: 0 0 20px rgba(0, 242, 255, 0.5);
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    text-shadow: 0 0 20px rgba(0, 242, 255, 0.5);
  }
  50% {
    transform: scale(1.05);
    text-shadow: 0 0 30px rgba(0, 242, 255, 0.8);
  }
}

.loader-status {
  font-size: 0.9rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 1;
}

/* Navbar */
.glass-nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1000px;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 15px 30px;
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}
.logo {
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: -1px;
}
.logo span {
  color: var(--primary);
}
.nav-links {
  display: flex;
  gap: 2rem;
}

/* Toggle (hamburger) */
.nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.6),
    rgba(20, 20, 20, 0.9)
  );
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 242, 255, 0.12);
}
.nav-toggle i {
  color: var(--primary);
  font-size: 1rem;
  transition: transform 0.25s ease, color 0.25s ease;
}
.nav-toggle:hover {
  border-color: var(--primary);
}

.nav-toggle[aria-expanded="true"] i {
  transform: rotate(90deg);
  color: var(--accent);
}

@media (max-width: 768px) {
  /* Compact, properly centered nav on mobile */
  .glass-nav {
    top: 12px;
    left: 12px;
    right: 12px;
    transform: none;
    width: auto;
    padding: 10px 16px;
    border-radius: 16px;
  }

  .logo {
    font-size: 1.2rem;
  }
  .nav-toggle {
    display: flex;
    width: 32px;
    height: 32px;
  }
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    background: rgba(10, 10, 10, 0.92);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px 12px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    z-index: 1001;
    box-sizing: border-box;
    max-width: none;
    max-height: 0;
    opacity: 0;
    transform: translateY(-8px);
    overflow: hidden;
    pointer-events: none;
    transition: max-height 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
  }
  .nav-links.open {
    max-height: 260px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-link {
    font-size: 0.95rem;
    display: inline-block;
    padding: 8px 12px;
    border-radius: 10px;
    width: 100%;
  }
  .nav-link.active::after {
    bottom: 0;
  }
}
.nav-link {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.9rem;
  transition: 0.3s;
  position: relative;
}
.nav-link:hover {
  color: var(--primary);
}
.nav-link.active {
  color: var(--primary);
  font-weight: bold;
}
.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: var(--primary);
}

/* Hero */
.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  text-align: center;
}

#matrixCanvas {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  z-index: -1;
}

.hero-content {
  max-width: 900px;
  padding: 0 20px;
}

.hero-badge {
  display: inline-block;
  padding: 10px 25px;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: bold;
  margin-bottom: 30px;
  box-shadow: 0 5px 20px rgba(0, 242, 255, 0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.hero-content h1 {
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 900;
  margin-bottom: 20px;
  letter-spacing: -3px;
  line-height: 1.1;
  background: linear-gradient(135deg, #fff, var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  color: var(--text-dim);
  font-size: 1.8rem;
  margin-bottom: 20px;
  font-weight: 300;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.hero-description {
  color: var(--text-dim);
  font-size: 1.1rem;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-down {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: 0.3s;
}

.scroll-down:hover {
  color: var(--accent);
}

.chevrons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.chevrons i {
  font-size: 1.8rem;
  animation: bounce 2s infinite;
}

.chevrons i:nth-child(2) {
  animation-delay: 0.2s;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.btn {
  padding: 15px 35px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.4s;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
}
.btn[disabled],
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.75;
  box-shadow: none;
  transform: none;
}
.btn-primary {
  background: var(--primary);
  color: #000;
  box-shadow: 0 5px 25px rgba(0, 242, 255, 0.4);
}
.btn-primary:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 35px rgba(0, 242, 255, 0.6);
}
.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}
.btn-outline:hover {
  background: var(--primary);
  color: #000;
  transform: translateY(-5px);
}
.btn-soon {
  background: linear-gradient(135deg, rgba(0, 242, 255, 0.15), rgba(112, 0, 255, 0.15));
  border: 1px dashed var(--primary);
  color: var(--text);
}

.btn-unavailable {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.3);
  color: var(--text-dim);
}
.btn-detail {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  font-size: 0.9rem;
  margin-top: 15px;
  padding: 10px 25px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.btn-detail::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #00f2ff, #00d9ff);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
  border-radius: 8px;
}

.btn-detail:hover {
  color: #000;
  border-color: #00d9ff;
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 242, 255, 0.5),
    0 0 20px rgba(0, 217, 255, 0.4);
}

.btn-detail:hover::before {
  opacity: 1;
}

/* Projets */
.projects {
  padding: 100px 5%;
}
.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.pre-title {
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.8rem;
}
.section-header h2 {
  font-size: 3rem;
  margin-top: 10px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
}

.project-card {
  background: var(--glass);
  border: 1px solid var(--border);
  padding: 40px 30px;
  border-radius: 30px;
  transition: 0.4s ease;
  position: relative;
  overflow: hidden;
  cursor: auto;
  display: flex;
  flex-direction: column;
  min-height: 350px;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    transparent,
    rgba(0, 242, 255, 0.1),
    transparent
  );
  opacity: 0;
  transition: 0.4s;
  pointer-events: none;
}

.project-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--primary);
  transform: translateY(-10px);
}

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

.card-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 20px;
}

.project-card .btn-detail {
  margin-top: auto;
}
.tech-tags {
  color: var(--accent);
  font-weight: bold;
  font-size: 0.8rem;
  margin: 10px 0;
}
.project-hours {
  color: var(--primary);
  font-weight: bold;
  font-size: 0.8rem;
  margin: 10px 0;
}

/* Compétences */
.skills {
  padding: 100px 5%;
  background: linear-gradient(180deg, rgba(112, 0, 255, 0.05), transparent);
}
.skills .section-header {
  margin-bottom: 60px;
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.skill-category {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 25px;
  padding: 35px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.skill-category::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 242, 255, 0.1),
    transparent
  );
  transition: 0.5s;
}

.skill-category:hover::before {
  left: 100%;
}

.skill-category:hover {
  border-color: var(--primary);
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 242, 255, 0.2);
}

.category-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.category-header i {
  font-size: 2rem;
  color: var(--primary);
}

.category-header h3 {
  font-size: 1.3rem;
  color: var(--text);
  font-weight: 700;
}

.tech-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.tech-item {
  background: rgba(0, 242, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 15px;
  font-size: 0.9rem;
  color: var(--text-dim);
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: default;
}

.tech-item i {
  color: var(--primary);
  font-size: 1.1rem;
}

.tech-item:hover {
  background: rgba(0, 242, 255, 0.15);
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.05);
}

/* À Propos */
.about {
  padding: 100px 5%;
}
.about-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: center;
}
.about-text {
  line-height: 1.8;
  color: var(--text-dim);
}
.about-text p {
  margin-bottom: 20px;
}
.about-text strong {
  color: var(--primary);
}

/* Offset pour que les ancres scrollent sans recouvrir le contenu sous la nav */
[id] {
  scroll-margin-top: 60px;
}

/* Parcours Section */
.parcours {
  padding: 100px 5%;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(0, 242, 255, 0.02),
    transparent
  );
}

.parcours-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  max-width: 1400px;
  margin: 50px auto 0;
}

.parcours-section {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.parcours-section:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 20px 40px rgba(0, 242, 255, 0.1);
}

.parcours-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}

.parcours-header i {
  font-size: 2rem;
  color: var(--primary);
}

.parcours-header h3 {
  font-size: 1.8rem;
  color: var(--text);
  font-weight: 700;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 30px;
}

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

.timeline-item {
  position: relative;
  margin-bottom: 30px;
  padding-bottom: 30px;
}

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

.timeline-dot {
  position: absolute;
  left: -36px;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg);
  box-shadow: 0 0 15px var(--primary);
  z-index: 2;
}

.timeline-content {
  background: rgba(255, 255, 255, 0.02);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.timeline-content:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--primary);
  transform: translateX(5px);
}

.timeline-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 10px;
  padding: 5px 12px;
  background: rgba(0, 242, 255, 0.1);
  border-radius: 20px;
}

.timeline-content h4 {
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 10px;
  font-weight: 600;
}

.timeline-location {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-location i {
  color: var(--accent);
}

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

.timeline-details li {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 8px;
  padding-left: 20px;
  position: relative;
  line-height: 1.6;
}

.timeline-details li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

/* Experience Card */
.experience-card {
  background: rgba(255, 255, 255, 0.02);
  padding: 30px;
  border-radius: 15px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.experience-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--primary);
}

.experience-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.experience-icon i {
  font-size: 2rem;
  color: var(--bg);
}

.experience-card h4 {
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 15px;
  font-weight: 600;
}

.experience-card p {
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 20px;
}

.stage-details {
  background: rgba(0, 242, 255, 0.05);
  padding: 20px;
  border-radius: 12px;
  border-left: 3px solid var(--primary);
  margin: 25px 0;
}

.stage-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.stage-info:last-child {
  margin-bottom: 0;
}

.stage-info i {
  color: var(--primary);
  font-size: 1.1rem;
  min-width: 20px;
}

.stage-info strong {
  color: var(--text);
}

.skills-highlight {
  margin: 25px 0;
  padding: 20px;
  background: rgba(112, 0, 255, 0.05);
  border-radius: 12px;
  border-left: 3px solid var(--accent);
}

.skills-highlight p {
  margin-bottom: 15px;
  color: var(--text);
  font-weight: 600;
}

.skills-highlight ul {
  list-style: none;
  padding-left: 0;
}

.skills-highlight li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.skills-highlight li:last-child {
  margin-bottom: 0;
}

.skills-highlight i {
  color: var(--accent);
  font-size: 0.9rem;
}

.experience-card .btn {
  margin-top: 25px;
  width: 100%;
  justify-content: center;
}

/* Terminal Amélioré */
.terminal-container {
  background: #000;
  border-radius: 15px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.terminal-header {
  background: #1a1a1a;
  padding: 15px 20px;
  display: flex;
  align-items: center;
}
.dots {
  display: flex;
  gap: 8px;
}
.dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dots span:nth-child(1) {
  background: #ff5f56;
}
.dots span:nth-child(2) {
  background: #ffbd2e;
}
.dots span:nth-child(3) {
  background: #27c93f;
}
.t-title {
  margin-left: 20px;
  font-size: 0.85rem;
  color: #666;
  font-family: monospace;
}
.terminal-body {
  padding: 25px;
  font-family: "Courier New", monospace;
  line-height: 1.8;
  font-size: 0.9rem;
  position: relative;
  min-height: 220px;
}
.terminal-body p {
  margin: 5px 0;
}
.p-green {
  color: #27c93f;
  font-weight: bold;
}

.term-line {
  display: block;
  margin: 4px 0;
  color: var(--text);
}

.cursor {
  display: inline-block;
  width: 10px;
  height: 16px;
  background: var(--primary);
  margin-left: 6px;
  animation: blink 1s steps(2, end) infinite;
}

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

/* Footer / Contact */
.footer {
  padding: 120px 5% 40px;
  background: linear-gradient(180deg, transparent, rgba(0, 242, 255, 0.05));
  border-top: 1px solid var(--border);
  scroll-margin-top: 140px;
}
.footer-content {
  max-width: 1000px;
  margin: 0 auto;
}
.footer .section-header {
  margin-bottom: 40px;
}
.footer-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-dim);
  margin-bottom: 50px;
}
.contact-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.contact-item {
  text-align: center;
  padding: 20px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 15px;
  transition: 0.3s;
}
.contact-item:hover {
  background: rgba(0, 242, 255, 0.1);
  border-color: var(--primary);
}
.contact-item i {
  font-size: 1.8rem;
  color: var(--primary);
  display: block;
  margin-bottom: 10px;
}
.contact-item a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}
.contact-item a:hover {
  color: var(--primary);
}
.social-links {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-bottom: 30px;
}
.social-links a {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: #fff;
  font-size: 1.2rem;
  transition: 0.3s;
}
.social-links a:hover {
  background: var(--primary);
  color: #000;
  transform: scale(1.1) translateY(-5px);
  border-color: var(--primary);
}
.footer-bottom {
  text-align: center;
  color: #666;
  font-size: 0.9rem;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

/* Modal Amélioré */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: linear-gradient(
        135deg,
        rgba(10, 10, 10, 0.95),
        rgba(20, 20, 30, 0.95)
      )
      padding-box,
    linear-gradient(135deg, var(--primary), var(--accent)) border-box;
  padding: 36px 32px 32px 32px;
  border-radius: 24px;
  max-width: 900px;
  width: min(92vw, 900px);
  max-height: 92vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 242, 255, 0.6) rgba(255, 255, 255, 0.04);
  width: 100%;
  position: relative;
  border: 2px solid transparent;
  box-shadow: 0 14px 40px rgba(0, 242, 255, 0.25);
}

.modal-content::-webkit-scrollbar {
  width: 6px;
}

.modal-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(0, 242, 255, 0.8),
    rgba(0, 170, 255, 0.7)
  );
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(0, 242, 255, 0.25);
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    rgba(0, 242, 255, 1),
    rgba(0, 170, 255, 0.9)
  );
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-dim);
  transition: 0.3s;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.close-modal:hover {
  color: var(--primary);
  background: rgba(0, 242, 255, 0.1);
  transform: rotate(90deg);
}

.modal-content h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Carousel Styles */
.carousel-container {
  margin-bottom: 16px;
  border-radius: 16px;
  overflow: hidden;
}

.carousel {
  position: relative;
  width: 100%;
  height: auto;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.carousel-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  max-height: 420px;
  opacity: 1;
}

@media (max-width: 600px) {
  .carousel-image {
    max-height: 50vh;
  }
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(0, 242, 255, 0.4);
  border: none;
  max-height: 200px;
  color: #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  z-index: 10;
}

.carousel-btn:hover {
  background: var(--primary);
  transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
  left: 12px;
}

.carousel-next {
  right: 12px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  padding: 0 10px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dot.active {
  background: var(--primary);
  width: 28px;
  border-radius: 5px;
}

.carousel-dot:hover {
  background: rgba(0, 242, 255, 0.6);
}

.modal-content p {
  color: var(--text-dim);
  line-height: 1.8;
  font-size: 1.05rem;
}

.modal-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 10px 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 242, 255, 0.12);
  border: 1px solid var(--border);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
}

.modal-points {
  margin: 10px 0 20px 0;
  padding-left: 20px;
  color: var(--text-dim);
  line-height: 1.6;
}

.modal-points li {
  margin-bottom: 6px;
}

.modal-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
  /* Remove legacy hidden state; visibility is controlled via animated dropdown rules above */
  .hero-content h1 {
    font-size: 3.5rem;
  }
  .hero-description {
    font-size: 1rem;
  }
  .hero-cta {
    flex-direction: column;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }
  .about-wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .tech-items {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-methods {
    grid-template-columns: 1fr;
  }
  .footer {
    padding: 80px 5% 40px;
  }
  .section-header h2 {
    font-size: 2rem;
  }
  .modal-content {
    padding: 40px 25px;
  }
  .parcours-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Loader responsive */
  .loader-logo {
    font-size: 2rem;
    gap: 3px;
  }
  .loader-subtitle {
    font-size: 1rem;
  }
  .progress-container {
    width: 250px;
  }
  .loader-percentage {
    font-size: 1.5rem;
  }
  .loader-status {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }
  .subtitle {
    font-size: 1.3rem;
  }
  .hero-description {
    font-size: 0.95rem;
  }
  .hero-badge {
    font-size: 0.75rem;
    padding: 8px 20px;
  }
  .btn {
    padding: 12px 25px;
    font-size: 0.9rem;
  }
  .projects-grid {
    gap: 15px;
  }
  .project-card {
    padding: 25px 20px;
  }
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .tech-items {
    grid-template-columns: 1fr;
  }
  .section-header h2 {
    font-size: 1.5rem;
  }
  .social-links {
    gap: 15px;
  }
  .social-links a {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  .modal-content {
    padding: 30px 20px;
  }
  .modal-content h2 {
    font-size: 1.5rem;
  }

  /* Loader responsive mobile */
  .loader-logo {
    font-size: 1.5rem;
    gap: 2px;
    letter-spacing: 0.05em;
  }
  .loader-subtitle {
    font-size: 0.9rem;
  }
  .progress-container {
    width: 200px;
  }
  .loader-percentage {
    font-size: 1.3rem;
  }
  .loader-status {
    font-size: 0.7rem;
    letter-spacing: 1px;
  }
}

::-webkit-scrollbar {
  width: 9px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(0, 242, 255, 0.8),
    rgba(0, 170, 255, 0.7)
  );
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(0, 242, 255, 0.25);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    rgba(0, 242, 255, 1),
    rgba(0, 170, 255, 0.9)
  );
}