html {
  scroll-behavior: smooth;
}

body {
  font-family: "Arial", sans-serif;
  margin: 0;
  padding: 0;
  background-color: #2c2c2c;
  color: #f1f1f1;
  transition: background 0.3s, color 0.3s;
}

/* --- HEADER --- */
header {
  background: #1f1f1f;
  padding: 1rem 2rem;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

h2 {
  font-size: 30px;
  margin: 0;
}

#education h2,
#skills h2,
#projects h2,
#contact h2 {
  text-align: center;
}

.intro h1 {
  font-size: 40px;
  margin: 0;
}

.intro span {
  color: #ff5c31;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto;
  padding: 0 3em 0 0;
  box-sizing: border-box;
}

.navbar img {
  border-radius: 50%;
  border: solid 1.5px #ffffff;
}

.navbar ul {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar li {
  text-align: center;
}

.navbar a {
  font-size: 1rem;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.navbar a span {
  display: none;
}

.navbar a i {
  font-size: 20px;
}

.navbar a:hover {
  color: #ff5c31;
}

#darkModeToggle {
  border: 1.5px solid #ffffff;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 8px;
  width: 44px;
  cursor: pointer;
  transition: background 0.3s ease;
}

/* --- SECTIONS --- */
.section {
  padding: 6rem 2rem;
}

.home-section {
  height: 580px;
  display: flex;
  justify-content: center;
  padding: 0 2rem 0 2rem;
  box-sizing: border-box;
  text-align: center;
}

.intro {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 2rem;
  text-align: center;
  width: 100%;
}

.profile-pic img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: solid 5px #ff5c31;
  object-fit: cover;
}

.links .btn {
  background: #ff5c31;
  color: white;
  padding: 10px 15px;
  border-radius: 8px;
  margin: 5px 5px 0 0;
  text-decoration: none;
  display: inline-block;
}

/* --- Parcours ---*/

.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem auto;
  max-width: 1500px;
}

.education-card {
  background: #333;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: left;
  transition: transform 0.3s ease, background 0.3s ease;
}

.education-card h3 {
  color: #ff5c31;
  margin-bottom: 0.5rem;
}

.education-card .school {
  font-weight: bold;
  color: #f1f1f1;
}

.education-card .year {
  color: #ccc;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.education-card .description {
  color: #ddd;
  font-size: 0.95rem;
}

/* --- SKILLS --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem auto;
}

.skill-category {
  background: #333;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}


.skill-category h3 {
  color: #ff5c31;
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  border-bottom: 2px solid #ff5c31;
  display: inline-block;
  padding-bottom: 0.3rem;
}

.skill-category li {
  display: flex;
  align-items: center;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  gap:20px;
  transition: background 0.3s ease;
}

.skill-category li:hover {
  background: rgba(255, 92, 49, 0.2);
}

/* --- PROJECTS --- */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 2rem auto;
  width: 100%;
  justify-items: center;
  box-sizing: border-box;
}

.project-card {
  width: 100%;
  height: auto;
  background: #333;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  cursor: pointer;
  padding: 1.5rem;
  box-sizing: border-box;
}

.project-description {
  padding: 1.5rem;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}

.project-description h3 {
  color: #ff5c31;
}

.project-card img {
  width: 80%;
  opacity: 0.6;
  height: auto;
  max-height: 180px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

.project-description h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  font-weight: bold;
}

.project-description p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
  color: #ddd;
}

.project-description {
  position: relative;
  z-index: 1;
  color: #fff;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  box-sizing: border-box;
}

.project-card img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.project-card img:hover{
  transform: scale(1.08);
  opacity: 0.9;
}

.project-card a {
  color: #ffffff;
  margin-top: 1rem;
  align-self: flex-start;
  padding-left: 1.5rem;
  transition: color 0.3s ease;
}

.project-card a:hover {
  color: #ff5c31;
  text-decoration: underline;
}


button {
  background: #ff5c31;
  color: white;
  border: none;
  cursor: pointer;
}

button,
.communication a,
.btn {
    transition: background-color 0.3s ease, transform 0.3s ease;
}

button:hover,
.communication a:hover,
.btn:hover {
    background-color: #d04d29;
}

/* --- CONTACT --- */

.info {
  margin: 2rem auto;
  max-width: 600px;
  text-align: center;
}

.info span {
    color: #ff5c31;
}



/* --- FOOTER --- */
footer {
  padding: 25px;
  background: #1f1f1f;
}

footer p {
  color: #ffffff;
  text-align: center;
}

/* --- LIGHT MODE --- */
.light-mode {
  background-color: #ffffff;
  color: #222;
}

.light-mode .project-card p,
.light-mode .project-card h3,
.light-mode .project-card a {
  color: #222;
}

.light-mode header {
  background: #222;
}

.light-mode .project-card,
.light-mode .skill-category {
  background: #eaeaea;
}

.light-mode .btn,
.light-mode button,
.light-mode .profile-pic img {
  border-color: #007bff;
  background-color: #007bff;
}

.light-mode .info span {
    color : #007bff
}

.light-mode .project-card a:hover {
  color: #007bff;
  text-decoration: underline;
}

.light-mode .btn:hover,
.light-mode button:hover {
  background: #0056cc;
}

.light-mode h3,
.light-mode .project-card h3,
.light-mode .skill-category i,
.light-mode .navbar a:hover {
  color: #007bff;
}

.light-mode .skill-category h3 {
  border-bottom: 2px solid #007bff;
}

.light-mode .skill-category li:hover {
  background: rgba(0, 86, 204, 0.25);
}

.light-mode .education-card {
  background: #eaeaea;
}

.light-mode .education-card h3,
.light-mode .intro span {
  color: #007bff;
}

.light-mode .education-card .school {
  color: #222;
}

.light-mode .education-card .year {
  color: #666;
}

.light-mode .education-card .description {
  color: #333;
}

.fade-section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-section.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 700px) {
  .navbar a span {
    display: inline;
  }
  .navbar a i {
    display: none;
  }
  .intro h1 {
    font-size: 60px;
  }
}
@media (min-width: 750px) {
  .intro h2 {
    font-size: 40px;
  }

  .skills-grid {
    gap: 2rem;
    padding: 0 auto;
    max-width: 1500px;
    margin: 2rem auto;
  }
}

@media (min-width: 800px) {
  .intro {
    flex-direction: row;
    justify-content: space-around;
    text-align: left;
  }

  .profile-pic img {
    width: 300px;
    height: 300px;
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-areas:
      "first first"
      "second third";
  }

  .project-card:nth-child(1) {
    grid-area: first;
  }

  .project-card:nth-child(2) {
    grid-area: second;
  }

  .project-card:nth-child(3) {
    grid-area: third;
  }
}

@media (min-width: 900px) {
  .projects-grid {
    max-width: 1500px;
    grid-template-columns: repeat(3, 1fr);
    grid-template-areas: "first second third";
  }
}
