
@import url('base.css');
@import url('layout.css');
@import url('components.css');
@import url('utilities.css');

/* Animations Globales */

/* Fade In Up */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade In */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Slide Up */
@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Typing Effect Cursor */
@keyframes blink {
  50% { border-color: transparent; }
}



/* Utility Classes for Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

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

.intro-fade-up {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* Typing Effect Style */
.typing-text {
  border-right: 3px solid var(--clr-primary);
  white-space: nowrap;
  overflow: hidden;
  animation: blink 0.75s step-end infinite;
  display: inline-block;
  vertical-align: bottom;
}



/* Hover Effects */

/* Profile Photo Hover */
.about__image img {
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.about__image img:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

/* Button Hover Enhancements */
.btn {
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* Project Tabs Hover */
.tab-button {
  position: relative;
  overflow: hidden;
}
.tab-button::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--clr-primary);
  transition: width 0.3s ease, left 0.3s ease;
  display: block !important; /* Override previous display:none */
}
.tab-button:hover::after {
  width: 80%;
  left: 10%;
}
.tab-button.active::after {
  width: 0; /* No underline for active tab as it has background */
}


.project-subcat-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 1rem;
  position: relative;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.project-subcat-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background-color: var(--clr-primary);
  margin-top: 6px;
}


/*--
liens et boutons
--*/

.icone-jour {
  color: #ffffff;
  font-size: 24px; 
  margin-right: 1em;
}

.link {
  padding: 0 0 0.3em 0;
  position: relative;
  text-decoration: none; 
}

.link:hover {
  color: var(--clr-primary);
}

.link::before {
  content: "";
  display: block;
  width: 0%;
  height: 0.2em;
  position: absolute;
  bottom: 0;
  left: 50%; 
  transform: translateX(-50%); 
  background-color: var(--clr-primary);
  transition: width 0.2s ease-in;
}

.link:hover::before,
.link:focus::before {
  width: 100%;
}

/* Disable hover underline for header links and project titles */
.header .link::before,
.link--projects::before {
  display: none;
}

.nav .link--nav {
  font-weight: 500;
  color: white;
  background-color: #000;
  border-radius: 8px;
  margin: 0 5px;
  transition: background-color 0.3s ease;
}

.nav .link--nav:hover {
  background-color: var(--clr-primary);
}

/* barre de navigation */

.nav ul, .nav li {
	margin: 0;
	padding: 0;
}
.nav ul {
	list-style: none;
	width: 100%;
}
.nav li {
	float: left;
	position: relative;
	width:auto;
}
.nav a {
	display: block;
	padding: 10px 35px;
	text-align: center;
	text-decoration: none;
	-webkit-transition: all .25s ease;
	-moz-transition: all .25s ease;
	-ms-transition: all .25s ease;
	-o-transition: all .25s ease;
	transition: all .25s ease;
  color: rgb(255, 255, 255);
}

#submenu, .submenu {
    position: absolute;
    top: 115%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    
    background: #000000;
    border-radius: 20px; /* Rounded like buttons */
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    padding: 10px;
    min-width: 200px;
    
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    margin-top: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#submenu::before, .submenu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    display: block;
}

#submenu::after, .submenu::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -8px;
    border-width: 8px;
    border-style: solid;
    border-color: transparent transparent #000000 transparent;
}

li:hover ul.submenu, li:focus-within ul.submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.submenu li {
    display: block;
    width: 100%;
    margin: 2px 0;
    background-color: transparent;
}

.submenu a {
    display: block;
    padding: 12px 20px;
    color: #ffffff; /* White text */
    text-decoration: none;
    border-radius: 12px;
    transition: background 0.3s ease, color 0.3s ease;
    font-weight: 500;
    font-size: 1rem;
    white-space: nowrap;
    text-align: center;
}

.submenu a:hover {
    background: var(--clr-primary);
    color: #ffffff;
}

.submenu a i {
    display: none;
}

.submenu a::after {
    display: none;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  background: var(--clr-bg-alt);
  padding: 0.5rem 1rem;
  z-index: 9999;
}

/* Nav toggle (hamburger) */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: white;
  font-size: 1.5rem;
}
.nav-toggle:focus-visible {
  outline: 2px solid var(--clr-primary);
}

/* Screen-reader only utility */
.sr-only {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
  border: 0; padding: 0; margin: -1px;
}

/* Focus styles for keyboard users */

/* Only show focus outlines for keyboard users (accessibility) */
:focus {
  outline: none; /* hide default focus for mouse interactions */
}

/* Use :focus-visible to present focus only when appropriate (keyboard) */
:focus-visible {
  outline: 3px solid var(--clr-primary);
  outline-offset: 2px;
}

/* Make images responsive by default */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/*-*/

.link--logo {
  color: #ffffff;
  font-weight: 800;
  font-size: 1.5rem;
  margin-right: 1em;
  text-transform: uppercase;
  letter-spacing: 2px;
  background-color: transparent;
  padding: 0.5em 1em;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: none;
}

.link--logo:hover {
  transform: scale(1.05);
  box-shadow: none;
}

.link--icon {
  color: var(--clr-fg-alt);
  font-size: 2em;
  margin-left: 0.5em;
}

.footer .link--icon {
  color: white;
  font-size: 2em;
  position: relative;
}

.btn {
  display: block;
  padding: 0.8em 1.4em;
  font-weight: 500;
  font-size: 0.9rem;
  transition: transform 0.2s ease-in-out;
}

.btn--outline {
  color: var(--clr-primary);
  border: 2px solid var(--clr-primary);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn--outline:focus,
.btn--outline:hover {
  color: var(--clr-bg);
}

.btn--outline:before {
  content: "";
  position: absolute;
  background-color: var(--clr-primary);
  right: 100%;
  bottom: 0;
  left: 0;
  top: 0;
  z-index: -1;
  transition: right 0.2s ease-in-out;
}

.btn--outline:hover::before,
.btn--outline:focus::before {
  right: 0;
}

.btn--plain {
  text-transform: initial;
  background-color: var(--clr-bg-alt);
  box-shadow: rgba(0, 0, 0, 0.15) 0px 3px 3px 0px;
  border: 0;
}

.btn--plain:hover {
  transform: translateY(-4px);
}

.btn--icon {
  padding: 0;
  font-size: 1.2rem;
}

.btn--icon:hover,
.btn--icon:focus {
  color: var(--clr-primary);
}

.btn--icon:active {
  transform: translateY(-5px);
}

/*--
mise en page
--*/

.center {
  display: flex;
  align-items: center;
}

.left {
  display: flex;
  align-items:flex-start;
}



main {
  max-width: 1100px;
  width: 95%;
  margin: 0 auto;
  padding-top: 2em;
}

.section {
  margin-top: 5em;
}

.section__title {
  text-align: center;
  margin-bottom: 1em;
  text-transform: uppercase;
}

/* Navigation */

.nav {
  background-color: transparent;
  padding: 0;
  color: var(--clr-fg);
  box-shadow: none;
}

.nav__list {
  display: flex;
  gap: 2em;
  margin: 0;
  align-items: center;
}

.nav__list-item {
  margin: 0;
}

.link--nav {
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  position: relative;
  padding: 0.6em 1.2em;
  transition: all 0.3s ease;
  border-radius: 50px;
  background-color: var(--clr-secondary);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.link--nav:hover {
  color: #ffffff;
  background-color: var(--clr-primary);
  box-shadow: 0 6px 12px rgba(79, 70, 229, 0.3);
  transform: translateY(-2px);
}

.link--nav::after {
  display: none;
}



/* à propos */

.about {
  margin-top: 4em;
  position: relative;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border: none;
  text-align: left;
  overflow: visible;
}

.about:hover {
  transform: none;
  box-shadow: none;
}

.about::before {
  display: none;
}

.about__container {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1em;
  align-items: start;
}

.about__content {
  z-index: 1;
}

.about__name {
  color: var(--clr-primary);
  font-weight: 800;
}

.about__subtitle {
  font-size: 1.8rem;
  color: var(--clr-fg-alt);
  margin: 0.5em 0 1em;
  font-weight: 600;
}

.about__desc {
  font-size: 1.1rem;
  color: var(--clr-fg);
  max-width: 600px;
  padding-bottom: 2em;
  line-height: 1.7;
}

.about__actions {
  display: flex;
  gap: 1.5em;
}

.about__image {
  position: relative;
  display: flex;
  justify-content: center;
}

.about__image img {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-hover);
  border: 4px solid white;
}

/* Buttons */
.btn {
  padding: 0.8em 2em;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  cursor: pointer;
}

.btn--primary {
  background-color: var(--clr-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5);
  color: white;
}

.btn--outline {
  background: transparent;
  border: 2px solid var(--clr-secondary);
  color: var(--clr-secondary);
}

.btn--outline:hover {
  background: var(--clr-secondary);
  color: white;
  transform: translateY(-3px);
}

@media (max-width: 768px) {
  .about__container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2em;
  }
  
  .about__actions {
    justify-content: center;
  }
  
  .about__desc {
    margin-left: auto;
    margin-right: auto;
  }
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.about > * {
  position: relative;
  z-index: 1;
}

.about h1 {
  font-size: 3.5rem;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 0.5em;
  letter-spacing: -1px;
}

.about__name {
  background: linear-gradient(135deg, var(--clr-primary) 0%, #1a5c8e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  z-index: 1;
  display: inline-block;
  font-weight: 800;
}

.about__name::after {
  display: none;
}

.about__role {
  margin-top: 1.5em;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--clr-fg);
  opacity: 0.9;
}

.about__desc {
  font-size: 1.15rem;
  max-width: 750px;
  line-height: 1.8;
  color: var(--clr-fg);
  text-align: left;
  font-weight: 400;
}

/* Tag style for technologies */
.projet__objectif strong, .project__description strong {
  background-color: rgba(41, 120, 181, 0.08);
  color: var(--clr-primary);
  padding: 0.2em 0.8em;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9em;
  margin: 0 0.2em;
  display: inline-block;
  border: 1px solid rgba(41, 120, 181, 0.15);
  transition: all 0.2s ease;
}

.projet__objectif strong:hover, .project__description strong:hover {
  background-color: var(--clr-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(41, 120, 181, 0.2);
}

.about__contact {
  margin-top: 3em;
  width: 100%;
  justify-content: center;
  display: flex;
  gap: 1.5em;
}

.about .link--icon {
  margin-right: 0;
  background: white;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  color: var(--clr-primary);
  font-size: 1.5rem;
}

.about .link--icon:hover {
  transform: translateY(-5px) rotate(10deg);
  box-shadow: 0 10px 25px rgba(41, 120, 181, 0.2);
  background: var(--clr-primary);
  color: white;
}

.about .btn--outline {
  margin-right: 0;
  padding: 1em 3.5em;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  line-height: 1;
  min-width: 160px;
  background: linear-gradient(135deg, var(--clr-primary) 0%, #1a5c8e 100%);
  color: white;
  border: none;
  box-shadow: 0 10px 20px rgba(41, 120, 181, 0.25);
  transition: all 0.3s ease;
}

.about .btn--outline:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(41, 120, 181, 0.35);
}

.about .btn--outline::before {
  display: none;
}

.about h2{
  font-size: 1.5rem;
  color: var(--clr-fg-alt);
}

/* Projets */

.projects__grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20em, 1fr));
  grid-gap: 2.5em;
}

/* Tabs for projects */
.projects-tabs {
  max-width: 1100px;
  width: fit-content;
  margin: 0 auto 3rem auto;
  position: relative;
  z-index: 6;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  padding: 0.5rem;
  border-radius: 50px;
  display: block;
  left: auto;
  transform: none;
  box-shadow: 0 10
px 250px rgba(0,0,0,0.05);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.projects__categories {
  position: relative;
  z-index: 1;
  min-height: 280px; /* reserve space for panels so tabs stay near top */
}
.tab-list {
  display: flex !important;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 0;
}
.tab-button {
  background: transparent;
  border: 0;
  padding: 0.8rem 2rem;
  font-weight: 600;
  color: var(--clr-fg);
  font-size: 1rem;
  cursor: pointer;
  position: relative;
  letter-spacing: 0.5px;
  text-transform: none;
  transition: all 0.3s ease;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}
.tab-button:focus {
  outline: none;
}
/* Remove the large box-shadow when clicking with mouse (preserve keyboard focus via :focus-visible) */
.tab-button:focus:not(:focus-visible) {
  box-shadow: none;
}
.tab-button:focus-visible {
  box-shadow: 0 0 0 4px rgba(41,120,181,0.2);
}
.tab-button.active {
  background: var(--clr-primary);
  color: white;
  box-shadow: 0 5px 15px rgba(41, 120, 181, 0.3);
}
.tab-button.active::after {
  display: none;
}
.tab-button::after {
  display: none;
}
.tab-button:hover:not(.active) {
  color: var(--clr-primary);
  background-color: rgba(0,0,0,0.03);
}

.tab-panel {
  /* Position panels absolutely so inactive ones don't take layout space */
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: block;
  opacity: 0;
  transform: translateY(20px);
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
}
.tab-panel.active {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

@media (max-width: 900px) {
  .tab-list {
    gap: 0.2rem;
  }
  .tab-button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  .projects-tabs {
    width: auto;
    border-radius: 15px;
  }
}

.project {
  padding: 0;
  margin: 0 auto;
  text-align: left;
  box-shadow: var(--shadow);
  background-color: var(--clr-bg-alt);
  transition: all 0.3s ease;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.05);
}

.project:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.project__image {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.project__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project:hover .project__image img {
  transform: scale(1.1);
}

.project__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 41, 59, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project:hover .project__overlay {
  opacity: 1;
}

.project__content {
  padding: 1.5em;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project h3 {
  margin-bottom: 0.5em;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--clr-fg-alt);
  text-align: center;
}

.project__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8em; /* Increased gap for larger icons */
  margin-top: 1.5em; /* Fixed margin instead of auto to avoid large gap */
  justify-content: center; /* Center the stack items */
}

.project__stack-item {
  font-size: 0.8rem;
  padding: 0.4em 1em;
  background-color: transparent;
  color: var(--clr-fg);
  border-radius: 50px;
  font-weight: 600;
  border: 1px solid rgba(0,0,0,0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.project__stack-item:hover {
  border-color: var(--clr-primary);
  color: var(--clr-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn--small {
  padding: 0.5em 1.2em;
  font-size: 0.9rem;
}


.project .link--projects {
  color: var(--clr-primary);
  text-decoration: none;
  background-image: linear-gradient(var(--clr-primary), var(--clr-primary));
  background-position: 0% 100%;
  background-repeat: no-repeat;
  background-size: 0% 2px;
  transition: background-size .3s;
}

.project:hover .link--projects {
  background-size: 100% 2px;
}

.project .link--icon {
  margin-left: 0.5em;
  font-size: 1.2rem;
  color: var(--clr-fg-alt);
  transition: color 0.2s ease;
  margin-top: auto;
  align-self: center;
}

.project .link--icon:hover {
  color: var(--clr-primary);
}

/* Compétences (icônes depuis Images/icons/) */

#skills {
  background-image: url('../images/white-smooth-marble-textured-background.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  padding: 3rem 2rem; /* Added padding for spacing */
  border-radius: 20px; /* Optional: rounded corners if inside main */
  margin-top: 4rem;
  overflow: hidden; /* Ensures the overlay respects the border-radius */
}

/* Overlay blanc léger pour la lisibilité si nécessaire */
#skills::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

.skills-grid {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4rem; /* Increased gap */
  align-items: start;
  position: relative;
  z-index: 1;
}

@media (max-width: 900px) {
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 4rem;
  }
}

.skill-column {
  text-align: center;
  padding: 0;
}

.skill-column h3 {
  font-size: 1.4rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #2978b5; /* Bleu spécifique */
  margin-bottom: 3.5rem; /* Increased margin */
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem;
  min-width: 120px;
  text-align: center;
}

/* The line with the block on the left */
.skill-column h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: #2978b5;
  border-radius: 2px;
}

.skill-column h3::before {
  content: '';
  position: absolute;
  bottom: -3px; /* Alignement */
  left: 0;
  width: 40px; /* Accent plus large */
  height: 9px;
  background-color: #2978b5;
  display: block;
  border-radius: 4px;
  z-index: 1;
}

.skill-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem 1rem;
}

/* Pour les outils qui sont moins nombreux ou différents */
.tools .skill-icons {
  /* No specific override needed for flex centering */
}

.skill-item {
  flex: 0 0 calc((100% - 2rem) / 3); /* Force 3 items per row accounting for 1rem gap */
  max-width: calc((100% - 2rem) / 3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  transition: all 0.3s ease;
  position: relative; /* For tooltip positioning */
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.skill-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.skill-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 0;
}

/* Text styling - Tooltip on hover */
.skill-item::after {
  content: attr(data-title);
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  background-color: var(--clr-primary); /* Blue background for tooltip */
  opacity: 0; /* Hidden by default */
  position: absolute;
  bottom: 100%; /* Above the icon */
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  padding: 4px 8px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
  z-index: 10;
}

/* Small arrow for the tooltip */
.skill-item::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  border: 5px solid transparent;
  border-top-color: var(--clr-primary);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  z-index: 10;
}

.skill-item:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-5px); /* Move up */
}

.skill-item:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0); /* Move up */
}

/* Span utilities for grid */
.span-two {
  grid-column: span 1; /* Reset span, let grid handle it naturally or keep it if needed */
}

.contact {
  margin-top: 6em;
  padding: 3em 2em;
  background-image: url('../images/close-up-black-marble-textured-background.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 20px;
  text-align: center;
  position: relative;
  /* Animation d'apparition */
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0; /* Start hidden for animation */
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}



.contact .section__title {
  margin-bottom: 1.5em;
  font-size: 2rem;
  font-weight: bold;
  position: relative;
  display: inline-block;
}

.contact .section__title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background-color: var(--clr-primary);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

/* Button Icons */
.btn i {
  margin-right: 0.5em;
}

/* Contact Container */
.contact__container {
  max-width: 600px;
  margin: 0 auto;
}

.contact__form {
  max-width: 100%;
  margin: 0 auto;
  text-align: left;
  background: var(--clr-bg-alt);
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border: 1px solid rgba(0,0,0,0.05);
}

/* Input Wrapper & Icons */
.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--clr-primary);
  font-size: 1.1rem;
  pointer-events: none;
  transition: color 0.3s ease;
}

.textarea-icon {
  top: 20px; /* Align with top for textarea */
  transform: none;
}

.form__input {
  width: 100%;
  padding: 1em 1em 1em 3em; /* Extra padding left for icon */
  border: 2px solid transparent;
  background-color: var(--clr-bg-alt-alt);
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--clr-fg);
  transition: all 0.3s ease;
}

.form__input:focus {
  outline: none;
  background-color: var(--clr-bg-alt);
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 4px rgba(41, 120, 181, 0.1);
}

.form__input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
  color: var(--clr-primary);
}

/* Contact Message */
.contact__message {
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: #d1fae5;
  color: #065f46;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  animation: fadeInUp 0.5s ease-out;
}

.contact__message i {
  font-size: 1.5rem;
}

.form__submit {
  width: 100%;
  margin-top: 1.5rem;
  cursor: pointer;
  background-color: var(--clr-primary);
  border: none;
  color: white;
  font-weight: 700;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 6px rgba(41, 120, 181, 0.2);
}

.form__submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(41, 120, 181, 0.3);
  background-color: #1a5c8e;
}

.form__submit:active {
  transform: translateY(0);
}

.form__submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}



/* Cleaned up conflicting styles */

.contact {
  flex-direction: column;
}

/* Parcours */

.lesParcours{
  background-image: url('../images/close-up-white-marble-textured-background.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 20px;
  padding: 3em 2em;
  box-shadow: var(--shadow);
}

.parcours__grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 2em;
}

@media (max-width: 900px) {
  .parcours__grid {
    grid-template-columns: repeat(auto-fit, minmax(18em, 1fr));
  }
}

.parcours {
  padding: 2em;
  margin: 0 auto;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s linear;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.parcours h3 {
  color: var(--clr-primary);
  position: relative;
  padding-bottom: 0.5em;
}

.parcours h3::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background-color: var(--clr-fg);
  margin: 0.5em auto 0;
}

.parcours:hover {
  transform: translateY(-7px);
}

.parcours__description {
  margin-top: 1em;
  color: var(--clr-fg-alt);
  font-weight: bold;
}

.parcours__stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 1.2em 0;
}

.parcours__img {
  margin: 0.5em;
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--clr-fg-alt);
}

.parcours__img img {
  width: 200px;
}

/* Projets professionnels */

.carte {
  background-color: var(--clr-bg);
  border: 1px solid var(--clr-bg);
  border-radius: 5px;
  box-shadow: var(--shadow);
  max-width: 600px;
  padding: 20px;
  transition: transform 0.2s;
  margin: 0 auto;
}

.carte:hover {
  transform: translateY(-5px);
}

.contenu {
  font-size: 18px;
  line-height: 1.5;
  color: var(--clr-fg-alt);
}

.carte h3 {
  color: var(--clr-primary);
  margin-bottom: 1em;
}

.carte strong{
  color: var(--clr-primary);
}

/* Projet */

.projet__context {
  background-color: var(--clr-bg-alt);
  padding: 2.5em;
  border-radius: 15px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr;
  gap: 2em;
  margin-top: 2em;
}

@media (min-width: 900px) {
  .projet__context {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .projet_contexte {
    grid-column: 1 / -1;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 1.5em;
    margin-bottom: 0.5em;
  }
}

.projet_contexte h2,
.projet__objectif h3 {
  color: var(--clr-primary);
  margin-bottom: 0.8em;
  font-weight: 600;
  position: relative;
}

.projet_contexte p,
.projet__objectif p {
  text-align: justify;
  line-height: 1.8;
}

.projet__objectif, .project__description {
  background-color: var(--clr-bg);
  padding: 1.5em;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
}

.projet__objectif:hover, .project__description:hover {
  transform: translateY(-5px);
}

.projet__objectif ul, .project__description ul {
  list-style-type: none;
  padding-left: 0;
  margin-top: 1em;
}

.projet__objectif li, .project__description li {
  margin-bottom: 0.8em;
  padding-left: 1.5em;
  position: relative;
}

.projet__objectif li::before, .project__description li::before {
  content: "•";
  color: var(--clr-primary);
  font-weight: bold;
  position: absolute;
  left: 0;
}

.about__context {
  margin-top: 1em;
}

.about__context.center {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 1.5em;
  flex-wrap: wrap;
  margin-top: 2em;
}

.projet__reponse {
  grid-column: 1 / -1;
  margin-top: 6em;
  text-align: center;
}

.projet__reponse h2 {
  color: var(--clr-primary);
  font-size: 2rem;
  margin-bottom: 1.5em;
  position: relative;
  display: inline-block;
  padding-bottom: 0.5em;
  border-bottom: none;
}

.projet__reponse h2::after {
  content: '';
  display: block;
  width: 50%;
  height: 4px;
  background-color: var(--clr-primary);
  margin: 0.5em auto 0;
  border-radius: 2px;
}

img.framed {
  max-width: 100%;
  height: auto;
  display: block;
  transition: all 0.3s ease-in-out;
  margin-bottom: 4em;
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

img.framed:hover {
  transform: scale(1.02);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.image-container {
  display: flex;
  justify-content: center;
}

/* Removed old .framed styles to avoid conflict with new clean look */

.screenshot-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 2em;
}

.screenshot-item {
  transition: transform 0.3s ease;
}

.screenshot-item:hover {
  transform: translateY(-5px);
}

.screenshot-item p {
  font-weight: bold;
  margin-top: 0.5em;
  color: var(--clr-fg);
}

.projet__reponse h3 {
  color: var(--clr-primary);
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

kbd {
  background-color: var(--clr-bg-alt);
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0.1em 0.4em;
  font-family: monospace;
  font-size: 0.9em;
  box-shadow: 0 1px 0px rgba(0,0,0,0.2);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.projet__context {
  animation: fadeInUp 0.8s ease-out forwards;
}

.projet__reponse {
  animation: fadeInUp 0.8s ease-out forwards;
  animation-delay: 0.2s;
  opacity: 0; /* Start hidden for animation */
}

.screenshot-item {
  opacity: 0; /* Start hidden for animation */
  animation: fadeInUp 0.6s ease-out forwards;
}

.screenshot-item:nth-child(1) { animation-delay: 0.3s; }
.screenshot-item:nth-child(2) { animation-delay: 0.4s; }
.screenshot-item:nth-child(3) { animation-delay: 0.5s; }
.screenshot-item:nth-child(4) { animation-delay: 0.6s; }

/* Button Improvements */
.btn--outline {
  transition: all 0.3s ease;
  z-index: 1;
  background-color: transparent;
}

.btn--outline::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background-color: var(--clr-primary);
  transition: width 0.3s ease-in-out;
  z-index: -1;
}

.btn--outline:hover::after,
.btn--outline:focus::after {
  width: 100%;
}

.btn--outline:hover,
.btn--outline:focus {
  color: #ffffff;
  border-color: var(--clr-primary);
  box-shadow: 0 4px 12px rgba(41, 120, 181, 0.3);
}

/* Icon Improvements */
.project-stack-icon {
  height: 2.5em; /* Increased size */
  width: auto;
  vertical-align: middle;
  margin: 0;
  transition: transform 0.2s ease;
  display: block;
}

.project-stack-icon:hover {
  transform: scale(1.2);
}


/* Footer */

.footer {
  padding: 2em 0 1em;
  margin-top: 4em;
  text-align: center;
  background: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #f0f0f0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -10px 30px rgba(0,0,0,0.1);
  position: relative;
  z-index: 10;
}

.footer__content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1em;
}

.footer__copyright {
  font-size: 1rem;
  color: #a0a0a0;
  letter-spacing: 0.5px;
}

.footer__copyright .highlight {
  color: var(--clr-primary);
  font-weight: 700;
}

.footer__social {
  display: flex;
  gap: 1.5em;
  margin: 0;
}

.footer .link--icon {
  font-size: 1.2rem;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  padding: 0;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.footer .link--icon::before {
  display: none;
}

.footer .link--icon:hover {
  background: var(--clr-primary);
  color: white;
  transform: translateY(-5px) rotate(360deg);
  box-shadow: 0 5px 15px rgba(41, 120, 181, 0.4);
  border-color: var(--clr-primary);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2em;
}

.footer__links a {
  text-decoration: none;
  color: #d0d0d0;
  font-size: 1.1rem;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

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

.footer__links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--clr-primary);
  transition: width 0.3s ease;
}

.footer__links a:hover::after {
  width: 100%;
}

/* BTS SIO */

.specialties__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18em, 1fr));
  grid-gap: 2em;
}

.specialty {
  padding: 2em;
  margin: 0 auto;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s linear;
  background-color: var(--clr-bg-alt-alt);
  color: var(--clr-fg-alt);
}

.specialty h3 {
  color: var(--clr-primary);
}

.specialty:hover {
  transform: translateY(-7px); /* Effet de lévitation au survol */
}

.specialty__description {
  margin-top: 1em;
}

.specialty__stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 1.2em 0;
}

.specialty__stack-item {
  margin: 0.5em;
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--clr-fg-alt);
}

/*--
Ecran 
--*/

@media (max-width: 600px) {
  .header {
    height: 6em;
  }

  .nav-toggle {
    display: block;
  }

  .section {
    margin-top: 4em;
  }

  .nav {
    text-align: center; 
  }

  .nav__list {
    flex-direction: column; 
    padding: 2em 0;
    position: absolute;
    right: 0;
    left: 0;
    top: 6em;
    width: 0;
    height: calc(100vh - 6em);
    overflow: hidden;
    transition: width 0.3s ease-in-out;
    background-color: #000000;
    align-items: center;
    justify-content: flex-start;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .display-nav-list {
    width: 100%;
  }

  .nav__list-item {
    margin: 1.5em 0;
    width: 100%;
    text-align: center;
  }

  .about {
    align-items: flex-start;
    margin-top: 2em;
  }

  .footer {
    padding: 2em;
    margin-top: 3em;
  }

  .scroll-container {
    display: none;
  }
}

/* Project Gallery */
.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.gallery-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
}

.image-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  background-color: #f0f0f0; /* Lighter placeholder */
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensure image fills the wrapper */
  object-position: center; /* Center the image */
  display: block;
  transition: transform 0.5s ease;
}

.image-wrapper:hover img {
  transform: scale(1.05);
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-wrapper:hover .overlay {
  opacity: 1;
}

.overlay span {
  color: white;
  font-weight: bold;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.caption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--clr-fg-alt);
  text-align: center;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-container {
  width: 100%;
  height: 100%;
  display: flex;
  overflow: auto; /* Allow scrolling when zoomed */
  padding: 20px;
}

.lightbox img {
  margin: auto; /* Center image and allow scrolling when overflowing */
  max-width: 100%;
  max-height: 100%;
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  transition: transform 0.3s ease;
  object-fit: contain;
}


.lightbox-controls {
  position: absolute;
  top: 20px;
  right: 30px;
  display: flex;
  gap: 20px;
  z-index: 2000; /* Ensure it's above everything */
}

.lightbox-zoom, .lightbox-close {
  color: white;
  font-size: 1.5rem; /* Slightly smaller icon */
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
  background: rgba(0,0,0,0.7); /* Darker background for better contrast */
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2); /* Subtle border */
}

.lightbox-zoom i, .lightbox-close i {
  color: #ffffff !important;
}

.lightbox-zoom:hover, .lightbox-close:hover {
  transform: scale(1.1);
  background: rgba(255,255,255,0.2);
  border-color: white;
}



/* Formation Page Enhancements */

.about.left {
  display: flex;
  flex-direction: column;
  gap: 16px;         /* espace naturel entre h1 et p */
}

/* Separator */
.separator {
  width: 80px;
  height: 4px;
  background-color: var(--clr-primary);
  margin: 1.5em 0;
  border-radius: 2px;
}

/* Parcours Timeline */
.parcours__timeline-container {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2em 0;
}

.parcours__line {
  display: none;
}

.parcours__grid {
  position: relative;
  z-index: 1;
  /* align-items: start; Removed to allow cards to stretch to same height */
}

.parcours {
  position: relative;
  background: var(--clr-bg-alt);
  padding: 2em;
  border-radius: 16px;
  transition: all 0.3s ease;
  border: 1px solid rgba(0,0,0,0.05);
  margin-top: 30px; /* Space for the dot/year */
}

.parcours:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
  border-color: var(--clr-primary);
}

.parcours__year {
  position: absolute;
  top: -45px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--clr-primary);
  color: white;
  padding: 0.3em 1em;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.9rem;
  box-shadow: 0 4px 10px rgba(41, 120, 181, 0.3);
}

.parcours__dot {
  position: absolute;
  top: -18px; /* Align with the line */
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  background-color: var(--clr-bg);
  border: 4px solid var(--clr-primary);
  border-radius: 50%;
  z-index: 2;
}

.parcours__img img {
  max-height: 80px;
  width: auto;
  object-fit: contain;
  margin-top: 1em;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.parcours:hover .parcours__img img {
  filter: grayscale(0%);
}

/* Stages Badges */
.badge {
  display: inline-block;
  background-color: transparent;
  color: var(--clr-primary);
  border: 1px solid var(--clr-primary);
  font-size: 0.75rem;
  padding: 0.2em 0.6em;
  border-radius: 4px;
  margin-left: 0.5em;
  vertical-align: middle;
  font-weight: 600;
  white-space: nowrap;
}

/* Projet Pro Card */
.carte {
  max-width: 900px;
  margin: 0 auto 4em;
  background: var(--clr-bg-alt);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease;
  border: 1px solid rgba(0,0,0,0.05);
}

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

.carte .contenu {
  padding: 3em;
  position: relative;
}

.carte__icon {
  font-size: 3rem;
  color: var(--clr-primary);
  margin-bottom: 1rem;
  opacity: 0.2;
  position: absolute;
  top: 20px;
  right: 30px;
}

.carte h3 {
  color: var(--clr-primary);
  font-size: 1.8rem;
  margin-bottom: 1em;
  position: relative;
  display: inline-block;
}

.carte h3::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background-color: var(--clr-primary);
  margin-top: 0.5em;
}

/* Responsive adjustments for timeline */
@media (max-width: 768px) {
  .parcours__line {
    display: none;
  }
  
  .parcours {
    margin-top: 1em;
  }
  
  .parcours__year {
    position: static;
    display: inline-block;
    transform: none;
    margin-bottom: 1em;
  }
  
  .parcours__dot {
    display: none;
  }
}


/* --- New Project Page Styles --- */

/* 1. Hero / Title */
.project-hero {
  text-align: center;
  padding: 6rem 1rem 4rem;
  background-color: var(--clr-bg-alt);
  background-image: 
    radial-gradient(at 0% 0%, rgba(41, 120, 181, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(41, 120, 181, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(41, 120, 181, 0.08) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(41, 120, 181, 0.05) 0px, transparent 50%);
  margin-bottom: 3rem;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  border-radius: 10px 10px 10px 10px;
}

/* Particles.js container */
#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 0;
}

#particles-js canvas {
  display: block;
  vertical-align: bottom;
}

.project-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232978b5' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 0;
  pointer-events: none;
}

.project-hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 800px;
  position: relative;
  z-index: 1;
  pointer-events: none; /* Allows mouse interaction with particles behind */
}

.project-hero__img {
  max-width: 100%;
  max-height: 180px; /* Reduced height for better logo aspect */
  width: auto;
  object-fit: contain;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
  animation: slideUp 0.6s ease-out;
  background-color: white;
  padding: 1rem; /* Added padding inside the white box */
  border: 1px solid rgba(0,0,0,0.05);
}

.project-title {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--clr-primary) 0%, #1a5c8e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.8rem;
  animation: fadeIn 0.8s ease-out;
  letter-spacing: -1px;
}

.project-badge {
  display: inline-block;
  background: white;
  color: var(--clr-primary);
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 0.5rem;
  border: 1.5px solid rgba(41, 120, 181, 0.2);
  transition: all 0.3s ease;
}

.project-badge:hover {
  background: var(--clr-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(41, 120, 181, 0.2);
}

/* 2. Cards & Layout */
.project-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .project-container {
    grid-template-columns: 3fr 1fr; /* Main content vs Sidebar */
  }
}

.project-full-width {
  grid-column: 1 / -1;
}

.card {
  background: var(--clr-bg-alt);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(0,0,0,0.03);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.card h3 {
  font-size: 1.4rem;
  color: var(--clr-fg);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.card h3 i {
  color: var(--clr-primary);
  font-size: 1.2em;
}

.card-list {
  list-style: none;
  padding: 0;
}

.card-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.8rem;
  color: var(--clr-fg-alt);
}

.card-list li::before {
  content: '';
  color: var(--clr-primary);
  font-weight: bold;
  position: absolute;
  left: 0;
  font-size: 1.2em;
  line-height: 1;
}

/* 3. Tech Stack */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 1rem;
}

.tech-icon {
  width: 50px;
  height: 50px;
  object-fit: contain;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: grayscale(20%);
}

.tech-icon:hover {
  transform: scale(1.2);
  filter: grayscale(0%);
  filter: drop-shadow(0 5px 15px rgba(0,0,0,0.2));
}

.tech-icon-fa {
  font-size: 3rem;
  color: var(--clr-fg-alt);
  transition: transform 0.3s ease, color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
}

.tech-icon-fa:hover {
  transform: scale(1.2);
  color: var(--clr-primary);
  text-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

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

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  cursor: pointer;
}

.gallery-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.gallery-item:hover .gallery-img {
  transform: scale(1.08);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 0.5rem;
  text-align: center;
  font-size: 0.85rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
  transform: translateY(0);
}

/* 5. Buttons */
.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--clr-primary);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(41, 120, 181, 0.3);
}

.btn-action:hover {
  background: #1a5c8e; /* Darker blue */
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(41, 120, 181, 0.4);
  color: white;
}

.btn-action--outline {
  background: transparent;
  border: 2px solid var(--clr-primary);
  color: var(--clr-primary);
  box-shadow: none;
}

.btn-action--outline:hover {
  background: var(--clr-primary);
  color: white;
}

/* Animations */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
