/* ========================================
   VARIABLES
======================================== */

:root {
  color-scheme: dark;

  --bg: #070d1b;
  --panel: #0d172b;
  --text: #e8eefb;
  --muted: #a8b7d2;
  --line: rgba(120, 165, 220, 0.2);
}

html.light {
  color-scheme: light;

  --bg: #f4f7fc;
  --panel: #ffffff;
  --text: #101827;
  --muted: #526078;
  --line: rgba(37, 65, 105, 0.18);
}


/* ========================================
   BASE
======================================== */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);

  font-family:
    "Inter",
    ui-sans-serif,
    system-ui,
    sans-serif;

  transition:
    background 0.25s,
    color 0.25s;
}


/* ========================================
   UTILITAIRES
======================================== */

.surface {
  background: var(--panel);
  border: 1px solid var(--line);
}

.muted {
  color: var(--muted);
}

.gradient-text {
  background:
    linear-gradient(
      100deg,
      #33c052 5%,
      #7c72ff 60%,
      #b56cff
    );

  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.shadow-glow {
  box-shadow:
    0 0 32px rgba(25, 186, 255, 0.14);
}


/* ========================================
   BOUTONS
======================================== */

.primary-btn {
  background:
    linear-gradient(
      105deg,
      #7657f5,
      #087de8
    );

  box-shadow:
    0 8px 28px rgba(71, 105, 255, 0.22);

  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.primary-btn:hover {
  transform: translateY(-3px);

  box-shadow:
    0 12px 34px rgba(71, 105, 255, 0.36);
}

.outline-btn {
  border: 1px solid #159fe9;

  transition:
    background 0.2s,
    transform 0.2s;
}

.outline-btn:hover {
  background: rgba(25, 186, 255, 0.1);
  transform: translateY(-2px);
}


/* ========================================
   CARTES DE COMPÉTENCES
======================================== */

.skill-card {
  perspective: 1000px;
  min-height: 150px;

  cursor: pointer;
  outline: none;
}

.skill-inner {
  position: relative;

  height: 100%;
  min-height: 230px;

  transform-style: preserve-3d;

  transition:
    transform 0.65s cubic-bezier(0.2, 0.75, 0.25, 1);
}

.skill-card.flipped .skill-inner,
.skill-card:focus-visible .skill-inner {
  transform: rotateY(180deg);
}

.skill-face {
  position: absolute;
  inset: 0;

  display: flex;
  flex-direction: column;

  padding: 1.4rem;

  border-radius: 1rem;
  border: 1px solid var(--line);

  background:
    linear-gradient(
      145deg,
      var(--panel),
      rgba(21, 45, 79, 0.72)
    );

  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

html.light .skill-face {
  background:
    linear-gradient(
      145deg,
      #ffffff,
      #edf4ff
    );
}

.skill-back {
  transform: rotateY(180deg);
  border-color: rgba(25, 186, 255, 0.6);
}

.skill-card:hover .skill-face {
  box-shadow:
    0 0 30px rgba(25, 186, 255, 0.12);
}


/* ========================================
   CARTES PROJETS
======================================== */

.project-card {
  transition:
    transform 0.25s,
    border-color 0.25s,
    box-shadow 0.25s;
}

.project-card:hover {
  transform: translateY(-6px);

  border-color:
    rgba(25, 186, 255, 0.6);

  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.16);
}

.project-art {
  background:
    radial-gradient(
      circle at 80% 20%,
      rgba(139, 92, 246, 0.38),
      transparent 35%
    ),
    linear-gradient(
      135deg,
      #101c38,
      #07101f
    );
}


/* ========================================
   ANIMATIONS REVEAL
======================================== */

.reveal {
  opacity: 0;

  transform:
    translateY(22px);

  transition:
    opacity 0.65s ease,
    transform 0.65s ease;
}

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


/* ========================================
   ORBES
======================================== */

.orb {
  position: absolute;

  border-radius: 9999px;

  filter: blur(55px);

  opacity: 0.22;

  pointer-events: none;

  animation:
    float 9s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(18px, -20px);
  }
}


/* ========================================
   ACCESSIBILITÉ
======================================== */

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;

    animation-duration: 0.01ms !important;

    transition-duration: 0.01ms !important;
  }

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