.stoke-light {
  font-family: "Stoke", serif;
  font-weight: 300;
  font-style: normal;
}

.stoke-regular {
  font-family: "Stoke", serif;
  font-weight: 400;
  font-style: normal;
}

.kaisei-decol-regular {
  font-family: "Kaisei Decol", serif;
  font-weight: 400;
  font-style: normal;
}

:root {
  --base-color: #F9F9F8;
  --base-variant: #F1F0EF;
  --box-color1: white;
  --box-color2: white;
  --text-color: #21201C;
  --primary-color: #f27461;
  --secondary-color: #db462f;
  --button-one: #0f0f0d;
  --button-two: #080707;
  --hover-one: #21201C;
  --hover-two: #24221e;
  --shadow: rgba(0, 0, 0, 0.2);
  --shadow-hover: rgba(0, 0, 0, 0.3);
  --border: #ddd;
  --progress-bar: #E2E1DE;
}

.darkmode {
  --base-color: #313131;
  --base-variant: #2A2A2A;
  --box-color1: #2A2A2A;
  --box-color2: #313131;
  --text-color: #EEEEEC;
  --primary-color: #f27461;
  --secondary-color: #db462f;
  --button-one: #e6e6e6;
  --button-two: #cccccc;
  --hover-one: #f2f2f2;
  --hover-two: #d9d9d9;
  --shadow: rgba(0, 0, 0, 0.2);
  --shadow-hover: rgba(0, 0, 0, 0.3);
  --border: #3B3A37;
  --progress-bar: #3A3A3A;
}

#theme-switch {
  height: 50px;
  width: 50px;
  padding: 0;
  border-radius: 50%;
  background-color: var(--base-variant);
  display: flex;
  justify-content: center;
  align-items: center;
}

#theme-switch svg {
  fill: var(--text-color);
}

#theme-switch svg:last-child {
  display: none;
}

.darkmode #theme-switch svg:first-child {
  display: none;
}

.darkmode #theme-switch svg:last-child {
  display: block;
}

* {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Kaisei Decol', serif;
  font-size: 1em;
  color: var(--text-color);
}

main {
  margin-top: 100px;
}

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

h1 {
  color: var(--text-color);
  font-family: 'Stoke', serif;
  text-align: center;
  font-size: 2.5em;
}

h2 {
  color: var(--text-color);
  font-family: 'Stoke', serif;
  text-align: center;
  font-size: 1.8em;
}

h3 {
  color: var(--text-color);
  font-family: 'Stoke', serif;
  text-align: center;
  font-size: 1.4em;
}

p {
  font-size: 1.1em;
  color: var(--text-color);
}

em {
  color: var(--primary-color);
  font-style: normal;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--base-color);
  padding: 10px 50px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  transform: translateY(0);
  transition: transform 0.3s ease;
}

header.hidden {
  transform: translateY(-100%);
}

header img:hover {
  opacity: 0.7;
}

.cta {
  display: inline-block;
  background: linear-gradient(var(--button-one), var(--button-two));
  color: var(--box-color1);
  font-family: 'Kaisei Decol', serif;
  border-radius: 50px;
  padding: 15px 30px;
}

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

.cta:hover {
  background: linear-gradient(var(--hover-one), var(--hover-two));
  text-decoration: none;
  color: var(--box-color2);
}

.lien-icone1 {
  margin-right: 30px;
}

.lien-icone2 {
  margin-left: 30px;
}

.lien-icone:hover {
  opacity: 0.8;
}

section {
  padding: 80px;
}

nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding-right: 150px;
}

nav a {
  margin-left: 30px;
  font-family: 'Stoke', serif;
}

.accueil {
  display: flex;
  flex-direction: column;
  width: var(--width);
  height: 88vh;
  align-items: center;
  justify-content: center;
  background-image: url('../images/light.png');
  background-size: cover;
  background-position: center;
}

.accueil-dark {
  overflow: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  width: var(--width);
  height: 88vh;
  align-items: center;
  justify-content: center;
  background-image: url('../images/dark.png');
  background-size: cover;
  background-position: center;
}

.accueil h1 {
  margin-bottom: 15px;
  font-size: 3.8em;
}

.accueil-dark h1 {
  margin-bottom: 15px;
  font-size: 3.8em;
}

.accueil h2 {
  margin-bottom: 30px;
  font-size: 3em;
}

.accueil-dark h2 {
  margin-bottom: 30px;
  font-size: 3em;
}

.logos-accueil {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 90px;
  margin-top: 60px;
}

.profil {
  background-color: var(--base-color);
  padding-top: 150px;
  padding-bottom: 150px;
}

.profil h1 {
  margin-bottom: 50px;
}

.presentation {
  display: flex;
  flex-direction: row;
  max-width: 1400px;
  align-items: center;
  margin: auto;
}

.presentation img {
  margin-right: 150px;
  border-radius: 30px;
  box-shadow: 5px 5px 15px var(--shadow);
  transition: transform 0.3s ease-in-out;
}

.presentation img:hover {
  transform: translateY(-15px);
  box-shadow: 5px 5px 20px var(--shadow-hover);
}

.presentation p {
  text-align: justify;
  border: 2px solid var(--border);
  padding: 80px;
  border-radius: 30px;
  width: max-content;
  box-shadow: 5px 5px 15px var(--shadow);
  background-color: var(--box-color1);
  transition: transform 0.3s ease-in-out;
}

.presentation p:hover {
  transform: translateY(-15px);
  box-shadow: 5px 5px 20px var(--shadow-hover);
}

.competences {
  background-color: var(--base-variant);
  padding-top: 150px;
  padding-bottom: 110px;
}

.competences p {
  text-align: center;
  margin-top: 40px;
  margin-bottom: 40px;
}

progress {
  width: 100px;
}

.cv-comp {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

.cv-comp label {
  font-family: 'Stoke', serif;
  margin-bottom: 10px;
  margin-top: 30px;
}

.comp {
  display: flex;
  flex-direction: column;
  margin: auto;
  border: 2px solid var(--border);
  padding: 80px;
  border-radius: 30px;
  width: max-content;
  box-shadow: 5px 5px 15px var(--shadow);
  background-color: var(--box-color2);
  transition: transform 0.3s ease-in-out;
}

.comp:hover {
  transform: translateY(-15px);
  box-shadow: 5px 5px 20px var(--shadow-hover);
}

.cv {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: auto;
}

.cv img {
  border-radius: 30px;
  transition: transform 0.3s ease-in-out;
  box-shadow: 5px 5px 15px var(--shadow);
}

.cv img:hover {
  transform: translateY(-15px);
  box-shadow: 5px 5px 20px var(--shadow-hover);
}

.projets {
  background-color: var(--base-color);
  padding-bottom: 157px;
}

.paraprojet {
  text-align: center;
  margin-top: 40px;
  margin-bottom: 100px;
}

.projet {
  background-color: var(--box-color1);
  border: 2px solid var(--border);
  border-radius: 15px;
  padding: 15px;
  text-align: center;
  box-shadow: 5px 5px 15px var(--shadow);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  animation: float 3s infinite ease-in-out;
}

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

.projet:hover {
  transform: translateY(-15px);
  box-shadow: 5px 5px 20px var(--shadow-hover);
}

.grid-projets {
  display: flex;
  grid-template-columns: 400px 400px 400px;
  grid-template-rows: 400px;
  gap: 200px;
  align-items: center;
  justify-content: center;
}

.grid-projets p {
  text-align: center;
  margin-top: 20px;
}

.container {
  position: relative;
  width: 100%;
}

.image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--text-color);
  opacity: 0.7;
  overflow: hidden;
  width: 100%;
  height: 0;
  border-radius: 10px;
}

.container:hover .overlay {
  height: 100%;
}

.text {
  color: var(--base-color);
  font-size: 1.2em;
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  text-align: center;
}

.contact {
  background-color: var(--base-variant);
  padding-bottom: 30px;
}

.contact h1 {
  margin-top: 20px;
}

.contact p {
  margin-top: 40px;
  margin-bottom: 10px;
  text-align: center;
}

.mail:hover {
  color: var(--secondary-color);
}

.footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-evenly;
  padding: 10px 30px;
  background-color: var(--base-variant);
}

.footer img:hover {
  opacity: 0.7;
}

.logos {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-evenly;
  margin-top: 10px;
  margin-bottom: 30px;
}

.lien-icone1:hover {
  opacity: 0.7;
}

.lien-icone2:hover {
  opacity: 0.7;
}

.range {
  position: relative;
  background-color: var(--progress-bar);
  width: 750px;
  height: 30px;
  transform: skew(30deg);
  font-family: 'Stoke', serif;

  &:before {
    --width: calc(var(--p) * 1%);
    
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--primary-color);
    z-index: 0;
    animation: load .5s forwards linear, glitch 2s infinite linear;
  }

  &:after {
    counter-reset: progress var(--p);
    content: counter(progress) '%';
    color: var(--text-color);
    position: absolute;
    left: 5%;
    top: 50%;
    transform: translateY(-50%) skewX(-30deg);
    z-index: 1;
  }
}

@keyframes load {
  to {
    width: var(--width);
  }
}

