*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

:root {
  --accent: #4b49ff;
  --accent-soft: rgba(75, 73, 255, .10);
}

[data-bs-theme="light"] {
  --bg: #ffffff;
  --surface: #f6f6f9;
  --border: #e9e9ef;
  --text: #16161c;
  --muted: #6b6f78;
}

[data-bs-theme="dark"] {
  --bg: #0f1115;
  --surface: #171a20;
  --border: #262a33;
  --text: #eef0f3;
  --muted: #9aa0ab;
  --accent: #7674ff;
  --accent-soft: rgba(118, 116, 255, .14);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  transition: background-color .35s ease, color .35s ease;
}

h1,
h2,
h3,
.font-display {
  font-family: 'Sora', sans-serif;
}

a {
  color: var(--accent);
  text-decoration: none;
}

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

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

.border-soft {
  border-color: var(--border) !important;
}

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

/* scrollbar aux couleurs du site (Chrome/Edge/Firefox) */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

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

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 20px;
  border: 2px solid var(--bg);
}

/* reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
  will-change: opacity, transform;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- NAVBAR ---------- */
.navbar {
  background: transparent;
  transition: background-color .3s ease, box-shadow .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: var(--bg);
  border-bottom-color: var(--border);
  box-shadow: 0 2px 20px rgba(0, 0, 0, .04);
}

[data-bs-theme="dark"] .navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, .35);
}

.navbar-brand {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  color: var(--text) !important;
}

.navbar-brand .dot {
  color: var(--accent);
}

.nav-link {
  color: var(--muted) !important;
  font-weight: 500;
  font-size: .95rem;
  transition: color .2s ease;
}

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

/* theme toggle */
.theme-toggle {
  width: 52px;
  height: 28px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  transition: background-color .3s ease;
}

.theme-toggle .knob {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform .3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .7rem;
}

[data-bs-theme="dark"] .theme-toggle .knob {
  transform: translateX(24px);
}


.hero {
  padding: 9rem 0 6rem;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero-video,
.hero-mist {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-video {
  z-index: -2;
  object-fit: cover;
  object-position: center;
  opacity: .62;
  filter: saturate(.85) contrast(1.05);
}

.hero-mist {
  z-index: -1;
  background:
    linear-gradient(115deg, rgba(8, 12, 24, .34) 0%, rgba(8, 12, 24, .18) 42%, rgba(8, 12, 24, .08) 100%),
    radial-gradient(circle at 78% 18%, rgba(75, 73, 255, .22), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(8, 12, 24, .42));
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

[data-bs-theme="dark"] .hero-video {
  opacity: .5;
}

[data-bs-theme="dark"] .hero-mist {
  background:
    linear-gradient(115deg, rgba(5, 8, 16, .9) 0%, rgba(5, 8, 16, .68) 45%, rgba(5, 8, 16, .36) 100%),
    radial-gradient(circle at 78% 18%, rgba(118, 116, 255, .25), transparent 42%),
    linear-gradient(180deg, rgba(5, 8, 16, .42), rgba(5, 8, 16, .9));
}

.hero-orb {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent), transparent 70%);
  opacity: .16;
  top: -160px;
  right: -160px;
  filter: blur(10px);
  animation: float 10s ease-in-out infinite;
  will-change: transform;
  pointer-events: none;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(24px)
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  font-size: .82rem;
  padding: .4rem .9rem;
  border-radius: 30px;
}

.eyebrow .ping {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -.02em;
}

.hero .highlight {
  color: var(--accent);
}

.hero p.lead {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 48ch;
}

.avatar-ring {
  width: 230px;
  height: 230px;
  border-radius: 50%;
  margin: 0 auto;
  background: linear-gradient(145deg, var(--accent), var(--accent-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}

.avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid var(--border);
  overflow: hidden;
}

.avatar-inner img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.btn-accent {
  background: var(--accent);
  border: none;
  color: #fff;
  font-weight: 600;
  padding: .75rem 1.5rem;
  border-radius: 10px;
  transition: filter .2s ease, transform .2s ease;
}

.btn-accent:hover {
  filter: brightness(1.08);
  color: #fff;
  transform: translateY(-1px);
}

.btn-accent:active {
  transform: translateY(0);
  filter: brightness(0.96);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  padding: .75rem 1.5rem;
  border-radius: 10px;
  transition: border-color .2s ease, color .2s ease;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}


section {
  padding: 5.5rem 0;
}

.eyebrow-sm {
  color: var(--accent);
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  font-weight: 700;
}

.stat {
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
}

.stat .num {
  font-family: 'Sora', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
}

.stat .lbl {
  color: var(--muted);
  font-size: .85rem;
}

.card-soft {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.card-soft:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .06);
  border-color: var(--accent);
}

[data-bs-theme="dark"] .card-soft:hover {
  box-shadow: 0 14px 30px rgba(0, 0, 0, .3);
}

.skill-pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: .55rem 1rem;
  border-radius: 30px;
  font-size: .9rem;
  font-weight: 500;
  transition: border-color .2s ease;
}

.skill-pill:hover {
  border-color: var(--accent);
}

.skill-pill i {
  color: var(--accent);
}

.proj-tag {
  font-size: .72rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: .25rem .6rem;
  border-radius: 6px;
}

.proj-link {
  font-weight: 600;
  font-size: .9rem;
}

.proj-link i {
  transition: transform .2s ease;
}

.proj-link:hover i {
  transform: translateX(3px);
}

.yt-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.4rem;
  flex-shrink: 0;
}

.youtube-video-wrap {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: #080c18;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .16);
}

.youtube-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: border-color .2s ease, transform .2s ease;
}

.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.contact-ic {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: var(--bg);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

footer {
  border-top: 1px solid var(--border);
  padding: 2.2rem 0;
  color: var(--muted);
  font-size: .9rem;
}

footer a {
  color: var(--muted);
  font-size: 1.15rem;
  transition: color .2s ease;
}

footer a:hover {
  color: var(--accent);
}

.modal-content {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 16px;
}

.form-control,
.form-select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

.form-control:focus,
.form-select:focus {
  background: var(--surface);
  color: var(--text);
  border-color: var(--accent);
  box-shadow: 0 0 0 .2rem var(--accent-soft);
}

.form-label {
  font-weight: 600;
  font-size: .88rem;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}


@media (max-width: 767.98px) {
  .hero {
    padding: 6.5rem 0 4rem;
    text-align: center;
  }

  .hero p.lead {
    max-width: none;
    margin-left: auto;
    margin-right: auto;
  }

  section {
    padding: 3.5rem 0;
  }

  .avatar-ring {
    width: 170px;
    height: 170px;
  }

  .avatar-inner {
    font-size: 2.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-orb,
  .eyebrow .ping {
    animation: none;
  }

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

  .card-soft,
  .contact-card,
  .btn-accent,
  .btn-accent:hover {
    transition: none;
    transform: none !important;
  }
}