* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Poppins;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #111;
  color: white;
}

section {
  padding: 120px 10%;
  position: relative;
  text-align: center;
}

nav {
  position: fixed;
  top: 0;
  width: 100%;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.8);
  display: flex;
  justify-content: center;
  padding: 18px;
  z-index: 1000;
}

nav ul {
  display: flex;
  gap: 50px;
  list-style: none;
}

nav a {
  text-decoration: none;
  color: #111;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

nav i {
  font-size: 16px;
}

@media (max-width: 950px) {
  nav ul { 
    gap: 25px;
  }
  nav span { 
    display: none; 
  }
}

.hero {
  background: #1c1c1c;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero img {
  width: 200px;
  border: 4px solid #ff5a36;
  border-radius: 50%;
  margin-bottom: 25px;
}

.hero h1 {
  font-size: 42px;
  margin-bottom: 20px;
}

.hero p {
  max-width: 700px;
  opacity: 0.8;
  margin-bottom: 30px;
}

.btn {
  background: #ff5a36;
  padding: 14px 30px;
  border-radius: 40px;
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease;
}

.btn:hover {
  background: white;
  color: #ff5a36;
}

@keyframes scaleUp {
  0% { transform: scale(1); }
  50% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.projects {
  display: grid;
  gap: 40px 20px;
  margin-top: 40px;
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .projects {
    grid-template-columns: 1fr;
  }
}

.project {
  background: #1c1c1c;
  padding: 28px;
  border-radius: 16px;
  transition: 0.35s;
  border: 1px solid rgba(255,255,255,0.06);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transition: transform 0.35s, opacity 0.6s;
}

.project.show {
  opacity: 1;
  transform: translateY(0);
}

.project::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(120deg, #ff5a36, #ff8a50);
  opacity: 0;
  transition: 0.3s;
}

.project:hover::before {
  opacity: 1;
}

.project:hover {
  transform: translateY(-2px);
  transition: transform 0.3s ease;
}

.project h3 {
  font-size: 22px;
  margin-bottom: 10px;
  font-weight: 600;
}

.project p {
  opacity: 0.8;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 10px;
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0;
  justify-content: center;
}

.stack span {
  background: rgba(255,255,255,0.15);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s, background 0.2s;
}

.stack span i {
  font-size: 16px;
}

.project-slider {
  position: relative;
  margin-top: 20px;
  padding: 10px;
}

.project-slider img {
  width: 100%;
  border-radius: 10px;
  display: none;
  cursor: pointer;
  transition: 0.35s;
}

.project-slider img.active { 
  display: block; 
}

.project-slider button, .overlay-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  border: none;
  color: white;
  font-size: 18px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  transition: 0.3s;
}

.project-slider button:hover, .overlay-btn:hover { 
  background: #ff5a36; 
}

.prev { 
  left: -20px; 
}
.next { 
  right: -20px; 
}

.github-btn {
  display: inline-block;
  margin-top: 18px;
  color: white;
  text-decoration: none;
  border: 2px solid #ff5a36;
  padding: 8px 18px;
  border-radius: 25px;
  transition: 0.3s;
  font-size: 14px;
  width: 75%;
}

.github-btn:hover {
  background: #ff5a36;
}

@media (max-width: 700px) {
  .projects { 
    grid-template-columns: 1fr; 
    gap: 30px; 
  }
}

.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px,1fr));
  gap: 20px;
  margin-top: 40px;
}

#skills {
  background: #f9f9f9;
  color: white;
}

#skills h2 { 
  color: black; 
}

.skill {
  background: #2d2d2d;
  padding: 20px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: transform 0.35s, opacity 0.5s;
}

.skill-icon{
  width: 45px;
  height: 45px;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: 0.3s;
}

.skill:hover .skill-icon{
  filter: grayscale(0%);
  opacity:1;
  transform:scale(1.05);
  transition: transform 0.3s ease;
}

.skill.show {
  opacity: 1;
  transform: translateY(0);
}

.hobbies {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.hobby {
  background: white;
  padding: 30px;
  border-radius: 12px;
  width: 200px;
  text-align: center;
  transition: 0.3s;
  opacity: 0;
  transition: transform 0.35s, opacity 0.6s;
}

.hobby.show {
  opacity: 1;
  transform: translateY(0);
}

.hobby i {
  font-size: 40px;
  margin-bottom: 15px;
  color: #ff6b00;
}

.hobby h3 { 
  color: black; 
  font-size: 18px; 
}

.hobby:hover {
  transform: translateY(-2px);
}

#formation {
  background: #f4f4f4;
  color: #111;
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: 80px auto;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 4px;
  height: 100%;
  background: #ff5a36;
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 100%;
  padding: 40px 0;
  text-align: center;
  opacity: 0;
  transition: transform 0.6s, opacity 0.6s;
}

.timeline-item.show {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item.left, .timeline-item.right {
  text-align: center;
}

.timeline-circle {
  position: relative;
  margin: 0 auto;
  width: 70px;
  height: 70px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid #ff5a36;
  overflow: hidden;
  transform: none;
}

.timeline-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.timeline-content { 
  margin-top: 20px;
  background-color: #f4f4f4;
  padding: 20px 0;
}

.timeline-start {
  background: #ff5a36;
  color: white;
  padding: 20px;
  border-radius: 10px;
  display: inline-block;
}

.cv-description{
  margin-top:20px;
  margin-bottom:30px;
}

.particles {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 0;
}

section > *:not(.particles), footer > *:not(.particles) { 
  position: relative; 
  z-index: 2; 
}

footer {
  position: relative;
  background: #111;
  color: #ddd;
  padding: 40px 20px;
  overflow: hidden;
}

footer .particles {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.footer-content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a,
.footer-contact a {
  color: var(--orange);
  text-decoration: none;
  font-weight: 500;
}

.footer-links a:hover,
.footer-contact a:hover {
  text-decoration: underline;
}

.footer-contact {
  font-size: 14px;
}

.copyright {
  font-size: 13px;
  opacity: 0.7;
}

.orange { 
  background: #ff5a36; 
  color: white; 
}

#mentions {
  padding: 160px 10px 60px 10px;
  text-align: left;
  background: #fefcf8;
  color: #222;
}

#mentions h2 {
  color: #ff5a36;
  text-align: center;
  margin-bottom: 40px;
}

.mentions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  max-width: 1400px;
  margin: 60px auto;
  padding: 0 40px;
}

.mention-card {
  background: #1c1c1c;
  color: #fff;
  padding: 28px;
  border-radius: 14px;
  border-top: 4px solid #ff5a36;
  border-right: 1px solid transparent;
  border-left: 1px solid transparent;
  border-bottom: 1px solid transparent;
  text-align: left;
}

.mention-card:hover {
  border-right: 2px solid #ff5a36;
  border-left: 2px solid #ff5a36;
  border-bottom: 2px solid #ff5a36;
  transition: 0.5s;
}

.mention-card h3 {
  color: #ff5a36;
  margin-bottom: 15px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mention-card p, .mention-card li {
  color: #eee;
  line-height: 1.6;
}

.mention-card ul {
  margin-bottom: 10px;
  padding-left: 20px;
}

.mention-card li {
  margin-bottom: 6px;
}

.mention-card a {
  color: #ff5a36;
  text-decoration: none;
}

.mention-card a:hover {
  text-decoration: underline;
}

.last-update {
  opacity: 0.7;
  margin-top: 10px;
}

@media (max-width: 768px) {
  .mentions-grid {
    grid-template-columns: 1fr;
    padding: 0 20px;
  }
}

@keyframes fadeSlideUp {
  0% { 
    opacity: 0; 
    transform: translateY(30px); 
  }
  100% { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

.fade-in { 
  opacity: 0; 
  animation: fadeSlideUp 1s forwards; 
}