/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Unbounded:wght@200..900&display=swap");

/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 3.5rem;
  /*========== Colors ==========*/
  --hue: 255;
  --first-color: hsl(var(--hue), 60%, 64%);
  --first-color-alt: hsl(var(--hue), 80%, 56%);
  --first-color-alt-2: hsl(var(--hue), 60%, 56%);
  --first-color-light: hsl(var(--hue), 60%, 74%);
  --title-color: hsl(240, 8%, 95%);
  --text-color: hsl(240, 8%, 70%);
  --text-color-light: hsl(240, 8%, 50%);
  --body-color: hsl(240, 100%, 2%);
  --container-color: hsl(240, 8%, 6%);

  /*========== Font and typography ==========*/
  --body-font: "Montserrat", sans-serif;
  --second-font: "Unbounded", sans-serif;
  --biggest-font-size: 2rem;
  --bigger-font-size: 1.75rem;
  --h1-font-size: 1.5rem;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1rem;
  --normal-font-size: .938rem;
  --small-font-size: .813rem;
  --smaller-font-size: .75rem;

  /*========== Font weight ==========*/
  --font-regular: 400;
  --font-medium: 500;
  --font-semi-bold: 600;

  /*========== z index ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
}

/*========== Responsive typography ==========*/
@media screen and (min-width: 1150px) {
  :root {
    --biggest-font-size: 3rem;
    --bigger-font-size: 2rem;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: .875rem;
    --smaller-font-size: .813rem;
  }
}

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

html {
  scroll-behavior: smooth;
  min-height: 100%;
}

body,
button {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
}

body {
  background-color: var(--body-color);
  color: var(--text-color);
  min-height: 100vh;
  /* ScrollReveal met body en height:100%, ce qui casse la hauteur du document */
  height: auto !important;
}

button {
  outline: none;
  border: none;
}

h1, h2, h3, h4 {
  color: var(--title-color);
  font-family: var(--second-font);
  font-weight: var(--font-semi-bold);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  max-width: 1120px;
  margin-inline: 1.5rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.section {
  padding-block: 5rem 1rem;
}

.section__title {
  text-align: center;
  font-size: var(--h1-font-size);
  margin-bottom: 3rem;
}

.section__title span {
  color: var(--first-color);
}

.main {
  overflow-x: hidden;
  overflow-y: visible;
}

/*=============== HEADER & NAV ===============*/
.header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  background-color: transparent;
  z-index: var(--z-fixed);
  transition: background-color .4s;
}

.header.scroll-header {
  background-color: hsla(240, 100%, 2%, .8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav {
  position: relative;
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo {
  color: var(--title-color);
  font-family: var(--second-font);
  font-size: var(--h2-font-size);
  font-weight: var(--font-semi-bold);
  transition: color .4s;
}

.nav__logo:hover {
  color: var(--first-color);
}

.nav__toggle,
.nav__close {
  display: flex;
  font-size: 1.5rem;
  color: var(--title-color);
  cursor: pointer;
}

/* Mobile nav */
@media screen and (max-width: 1149px) {
  .nav__menu {
    position: fixed;
    top: 0;
    right: -100%;
    background-color: hsla(240, 100%, 2%, .95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    width: 80%;
    height: 100%;
    padding: 6rem 3rem 0;
    transition: right .4s;
    z-index: var(--z-fixed);
  }
}

.nav__menu.show-menu {
  right: 0;
}

.nav__list {
  display: flex;
  flex-direction: column;
  row-gap: 2.5rem;
}

.nav__link {
  color: var(--text-color);
  font-weight: var(--font-medium);
  transition: color .4s;
}

.nav__link:hover {
  color: var(--first-color);
}

.nav__close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
}

/* Active link */
.active-link {
  color: var(--first-color);
}

/*=============== HOME ===============*/
.home {
  padding-top: 6rem;
  padding-bottom: 2rem;
}

.home__container {
  row-gap: 2rem;
  justify-items: center;
  text-align: center;
}

.home__greeting {
  color: var(--first-color);
  font-size: var(--normal-font-size);
  font-weight: var(--font-medium);
  margin-bottom: .5rem;
}

.home__name {
  font-size: var(--biggest-font-size);
  line-height: 1.2;
}

.home__image {
  position: relative;
  width: 360px;
  height: 450px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.home__blob {
  position: relative;
  width: 100%;
  height: 100%;
  background: transparent;
  overflow: hidden;
  display: flex;
  justify-content: center;
  border-radius: 100%;
  align-items: center;
}

.home__perfil {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.home__split-text {
  color: var(--first-color-light);
  font-size: var(--normal-font-size);
  font-weight: var(--font-medium);
}

.home__profession {
  font-size: var(--bigger-font-size);
  line-height: 1.2;
}

.home__profession-1 {
  display: block;
  background: linear-gradient(90deg, var(--first-color), var(--first-color-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.home__profession-2 {
  display: block;
}

.home__social {
  display: flex;
  column-gap: 1rem;
  justify-content: center;
}

.home__social-link {
  color: var(--text-color);
  font-size: 1.5rem;
  transition: color .4s, transform .4s;
}

.home__social-link:hover {
  color: var(--first-color);
  transform: translateY(-.25rem);
}

.home__cv {
  display: inline-flex;
  align-items: center;
  column-gap: .5rem;
  color: var(--text-color);
  font-family: var(--second-font);
  font-size: var(--small-font-size);
  font-weight: var(--font-semi-bold);
  letter-spacing: 2px;
  text-transform: uppercase;
  border: 1px solid var(--text-color-light);
  padding: .75rem 1.5rem;
  border-radius: .5rem;
  transition: border-color .4s, color .4s;
}

.home__cv:hover {
  border-color: var(--first-color);
  color: var(--first-color);
}

/*=============== BUTTON ===============*/
.button {
  display: inline-flex;
  align-items: center;
  column-gap: .5rem;
  background-color: var(--first-color);
  color: var(--title-color);
  font-family: var(--second-font);
  font-size: var(--small-font-size);
  font-weight: var(--font-semi-bold);
  padding: .75rem 1.5rem;
  border-radius: .5rem;
  letter-spacing: 1px;
  transition: background-color .4s, transform .4s;
}

.button:hover {
  background-color: var(--first-color-alt);
  transform: translateY(-.25rem);
}

/*=============== ABOUT ===============*/
.about__container {
  row-gap: 2rem;
  justify-items: center;
}

.about__image {
  position: relative;
  width: 250px;
  height: 320px;
  border-radius: 1rem;
  overflow: hidden;
}

.about__perfil {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1rem;
}

.about__info {
  text-align: center;
}

.about__description {
  margin-bottom: 2rem;
  line-height: 1.8;
}

.about__description b {
  color: var(--first-color);
}

/*=============== PROJECTS ===============*/
.projects.section {
  overflow: visible;
}

.projects__container {
  position: relative;
  overflow: visible;
}

.projects__swiper {
  padding-bottom: 3rem;
  padding-right: 5rem;
  overflow: visible;
}

.projects__swiper .swiper-slide {
  height: auto;
  display: flex;
  align-items: stretch;
}

.projects__card {
  background-color: var(--container-color);
  border: 1px solid hsla(var(--hue), 60%, 64%, .1);
  padding: 2rem 1.5rem;
  border-radius: 1rem;
  transition: border-color .4s;
  width: 100%;
  min-height: 320px;
  display: flex;
  flex-direction: column;
}

.projects__card:hover {
  border-color: var(--first-color);
}

.projects__content {
  row-gap: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.projects__description {
  font-size: var(--small-font-size);
  line-height: 1.6;
  flex: 1;
}

.projects__number h1 {
  font-size: 3rem;
  color: var(--first-color);
  opacity: .3;
  font-family: var(--second-font);
}

.projects__title {
  color: var(--first-color);
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: .5rem;
}

.projects__subtitle {
  font-size: var(--h2-font-size);
  line-height: 1.3;
  margin-bottom: 1rem;
}

.projects__subtitle-tech {
  color: var(--text-color-light);
  font-size: var(--smaller-font-size);
  font-weight: var(--font-medium);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: .5rem;
}

.projects__navigation {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 0;
  z-index: 10;
}

.projects__navigation .swiper-button-prev {
  display: none; /* Cache le bouton prev */
}

.projects__navigation .swiper-button-next {
  position: static;
  width: 3rem;
  height: 3rem;
  background-color: var(--container-color);
  border: 1px solid hsla(var(--hue), 60%, 64%, .2);
  border-radius: 50%;
  color: var(--first-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: border-color .4s, background-color .4s;
  margin: 0;
}

.projects__navigation .swiper-button-prev::after,
.projects__navigation .swiper-button-next::after {
  display: none;
}

.projects__navigation .swiper-button-next:hover {
  border-color: var(--first-color);
  background-color: var(--first-color);
  color: var(--title-color);
}

/*=============== WORK ===============*/
.work__container {
  row-gap: 2rem;
}

.work__tabs {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  column-gap: 2rem;
}

.work__button {
  font-family: var(--second-font);
  font-size: var(--normal-font-size);
  font-weight: var(--font-semi-bold);
  color: var(--text-color);
  background: none;
  cursor: pointer;
  padding: .5rem 1.5rem;
  border-radius: .5rem;
  border: 1px solid transparent;
  transition: color .4s, border-color .4s;
}

.work__button:hover {
  color: var(--first-color);
}

.work__button-active {
  color: var(--first-color);
  border-color: var(--first-color);
}

.work__content {
  display: grid;
  gap: 1.5rem;
}

.work__content-hidden {
  display: none;
}

.work__card {
  background-color: var(--container-color);
  border: 1px solid hsla(var(--hue), 60%, 64%, .1);
  padding: 2rem 1.5rem;
  border-radius: 1rem;
  transition: border-color .4s;
}

.work__card:hover {
  border-color: var(--first-color);
}

.work__title {
  font-size: var(--h2-font-size);
  margin-bottom: .5rem;
  line-height: 1.3;
}

.work__subtitle {
  color: var(--first-color);
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
  margin-bottom: .25rem;
}

.work__year {
  color: var(--text-color-light);
  font-size: var(--smaller-font-size);
  margin-bottom: 1rem;
}

.work__description {
  font-size: var(--small-font-size);
  line-height: 1.6;
}

/*=============== SERVICES (Compétences) ===============*/
.services__container {
  row-gap: 1rem;
  /* Sans ça, la grille étire les 3 cartes à la hauteur de la plus haute : on croit que tout est ouvert */
  align-items: start;
}

.services__card {
  background-color: var(--container-color);
  border: 1px solid hsla(var(--hue), 60%, 64%, .1);
  border-radius: 1rem;
  overflow: hidden;
  transition: border-color .4s;
}

.services__card:hover {
  border-color: var(--first-color);
}

.services__header {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  cursor: pointer;
  column-gap: 1rem;
}

.services__icon {
  font-size: 1.5rem;
  color: var(--first-color);
}

.services__title {
  flex: 1;
  font-size: var(--normal-font-size);
}

.services__arrow {
  font-size: 1.5rem;
  color: var(--first-color);
  transition: transform .4s;
}

.services__info {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease, padding .4s;
}

/* Hide services info */
.services__card.open .services__info {
  max-height: 28rem;
  padding: 0 1.5rem 1.5rem;
}

/* Rotate icon */
.services__card.open .services__arrow {
  transform: rotate(180deg);
}

.services__description {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.services__subtitle {
  color: var(--text-color-light);
  font-size: var(--smaller-font-size);
  font-weight: var(--font-medium);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: .5rem;
}

.services__skills {
  color: var(--first-color);
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
}

/*=============== SOFT SKILLS ===============*/
.soft-skills {
  margin-top: 3rem;
  text-align: center;
}

.soft-skills__title {
  font-family: var(--second-font);
  font-size: var(--h2-font-size);
  color: var(--title-color);
  margin-bottom: 2rem;
}

.soft-skills__container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.soft-skills__item {
  display: flex;
  align-items: center;
  column-gap: .5rem;
  background-color: var(--container-color);
  border: 1px solid hsla(var(--hue), 60%, 64%, .1);
  padding: .75rem 1.25rem;
  border-radius: 2rem;
  color: var(--text-color);
  font-size: var(--small-font-size);
  transition: border-color .4s, color .4s;
}

.soft-skills__item:hover {
  border-color: var(--first-color);
  color: var(--first-color);
}

.soft-skills__item i {
  font-size: 1.25rem;
  color: var(--first-color);
}

/*=============== VEILLE TECHNOLOGIQUE ===============*/
.veille__container {
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.veille__card {
  background-color: var(--container-color);
  border: 1px solid hsla(var(--hue), 60%, 64%, .1);
  padding: 2rem 1.5rem;
  border-radius: 1rem;
  transition: border-color .4s, transform .4s;
}

.veille__card:hover {
  border-color: var(--first-color);
  transform: translateY(-.25rem);
}

.veille__icon {
  font-size: 2.5rem;
  color: var(--first-color);
  margin-bottom: 1rem;
}

.veille__title {
  font-size: var(--h3-font-size);
  margin-bottom: 1rem;
}

.veille__description {
  font-size: var(--small-font-size);
  line-height: 1.6;
}

/*=============== CONTACT ===============*/
.contact__container {
  row-gap: 2rem;
}

.contact__description {
  text-align: center;
}

.contact__description p {
  font-size: var(--h2-font-size);
  font-family: var(--second-font);
  color: var(--title-color);
}

.contact__content {
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.contact__box {
  background-color: var(--container-color);
  border: 1px solid hsla(var(--hue), 60%, 64%, .1);
  padding: 1.5rem;
  border-radius: 1rem;
  transition: border-color .4s;
}

.contact__box:hover {
  border-color: var(--first-color);
}

.contact__title {
  display: flex;
  align-items: center;
  column-gap: .5rem;
  font-size: var(--normal-font-size);
  margin-bottom: .75rem;
}

.contact__title i {
  font-size: 1.25rem;
  color: var(--first-color);
}

.contact__address {
  font-size: var(--small-font-size);
}

.contact__social {
  display: flex;
  column-gap: 1rem;
}

.contact__link {
  display: inline-flex;
  align-items: center;
  column-gap: .25rem;
  color: var(--text-color);
  font-size: var(--small-font-size);
  transition: color .4s;
}

.contact__link:hover {
  color: var(--first-color);
}

.contact__link i {
  font-size: 1.25rem;
}

/*=============== FOOTER ===============*/
.footer {
  padding: 2rem 0;
  text-align: center;
  row-gap: .5rem;
  border-top: 1px solid hsla(var(--hue), 60%, 64%, .1);
}

.footer__copy {
  font-size: var(--small-font-size);
  color: var(--text-color-light);
}

.footer__copy span {
  color: var(--first-color);
  font-weight: var(--font-semi-bold);
}

.footer__year {
  font-size: var(--smaller-font-size);
  color: var(--text-color-light);
}

/*=============== SCROLL BAR ===============*/
::-webkit-scrollbar {
  width: .6rem;
  border-radius: .5rem;
  background-color: hsl(240, 8%, 10%);
}

::-webkit-scrollbar-thumb {
  border-radius: .5rem;
  background-color: hsl(240, 8%, 20%);
}

::-webkit-scrollbar-thumb:hover {
  background-color: hsl(240, 8%, 30%);
}

/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 340px) {
  .container {
    margin-inline: 1rem;
  }

  .home__name {
    font-size: 1.75rem;
  }

  .home__profession {
    font-size: 1.25rem;
  }

  .projects__swiper {
    padding-right: 4rem;
  }
}

/* For mobile devices */
@media screen and (max-width: 767px) {
  .projects__swiper {
    padding-right: 4.5rem;
  }

  .projects__navigation {
    right: 0.5rem;
  }
}

/* For medium devices */
@media screen and (min-width: 576px) {
  .about__container,
  .contact__content {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  .veille__container {
    grid-template-columns: repeat(2, 1fr);
  }

  .work__content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (min-width: 768px) {
  .section {
    padding-block: 7rem 2rem;
  }

  .home__container {
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    text-align: left;
  }

  .home__info {
    order: 1;
  }

  .home__image {
    order: 2;
    width: 350px;
    height: 440px;
  }

  .home__split {
    order: 3;
    text-align: right;
  }

  .home__social {
    grid-column: 1;
    order: 4;
    justify-content: flex-start;
  }

  .home__cv {
    grid-column: 3;
    order: 5;
    justify-self: flex-end;
  }

  .contact__content {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* For large devices */
@media screen and (min-width: 1150px) {
  .container {
    margin-inline: auto;
  }

  .nav {
    height: calc(var(--header-height) + 1rem);
  }

  .nav__toggle,
  .nav__close {
    display: none;
  }

  .nav__list {
    flex-direction: row;
    column-gap: 3rem;
  }

  .home {
    padding-top: 8rem;
  }

  .home__image {
    width: 400px;
    height: 500px;
  }

  .home__social {
    flex-direction: column;
    position: fixed;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    row-gap: 1.5rem;
    z-index: var(--z-tooltip);
  }

  .home__social-link {
    font-size: 1.5rem;
  }

  .about__container {
    grid-template-columns: 300px 1fr;
    column-gap: 3rem;
  }

  .about__info {
    text-align: left;
  }

  .projects__card {
    padding: 2.5rem 2rem;
  }

  .work__content {
    grid-template-columns: repeat(3, 1fr);
  }

  .services__container {
    grid-template-columns: repeat(3, 1fr);
  }

  .veille__container {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* For 2K resolutions */
@media screen and (min-width: 2048px) {
  .container {
    max-width: 1400px;
  }

  body {
    zoom: 1.2;
  }
}
