/* Base */
:root {
  --primary-color: #64ffda;
  --background-color: #0a192f;
  --text-color: #8892b0;
  --heading-color: #ccd6f6;
}

/* Layout */
body {
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: 'Calibre', sans-serif;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Components */
.nav-link {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

/* Responsive */
@media (max-width: 768px) {
  .mobile-nav {
    display: block;
  }
  nav {
    display: none;
  }
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

header {
    background: #333;
    color: #fff;
    padding: 10px 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.nav {
    list-style: none;
    display: flex;
}

.nav-item {
    margin-left: 20px;
}

.nav-item a {
    color: #fff;
    text-decoration: none;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 4px 0;
}

@media (max-width: 768px) {
    .nav {
        display: none;
        flex-direction: column;
        width: 100%;
    }

    .nav-item {
        margin: 10px 0;
    }

    .menu-toggle {
        display: flex;
    }

    .nav.active {
        display: flex;
    }
}:root {
    --navy: #0a192f;
    --light-navy: #112240;
    --lightest-navy: #233554;
    --navy-shadow: rgba(2, 12, 27, 0.7);
    --dark-slate: #495670;
    --slate: #8892b0;
    --light-slate: #a8b2d1;
    --lightest-slate: #ccd6f6;
    --white: #e6f1ff;
    --green: #64ffda;
    --green-tint: rgba(100, 255, 218, 0.1);
    
    --bg-darkest: #0a192f;
    --bg-dark: #0a192f;
    --bg-light-dark: #112240;
    --text-lightest: #e6f1ff;
    --text-light: #ccd6f6;
    --text-muted: #8892b0;
    --text-accent: #64ffda;
    --border-color: #233554;
    --transition-speed: 0.3s;
    --font-sans: 'Calibre', 'Inter', 'San Francisco', 'SF Pro Text', -apple-system, system-ui, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
    
    --fz-xxs: 12px;
    --fz-xs: 13px;
    --fz-sm: 14px;
    --fz-md: 16px;
    --fz-lg: 18px;
    --fz-xl: 20px;
    --fz-xxl: 22px;
    --fz-heading: 32px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

::selection {
    background-color: rgba(100, 255, 218, 0.2);
    color: var(--text-accent);
}

body {
    font-family: var(--font-sans);
    background-color: var(--navy);
    color: var(--slate);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    counter-reset: section;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 50px 0;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    backdrop-filter: blur(15px);
    background-color: rgba(10, 25, 47, 0.9);
    box-shadow: rgba(2, 12, 27, 0.7) 0px 10px 30px -10px;
    font-size: 16px;
    z-index: 1000;
}

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

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav ul li {
    display: inline-block;
}

nav ul li a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

nav ul li a:hover {
    color: var(--text-accent);
}


#hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - 100px);
    padding: 0;
    margin-top: 0;
}

.hero-content {
    max-width: 1000px;
    padding: 0 20px;
}

.pre-heading {
    color: var(--green);
    font-family: var(--font-mono);
    font-size: var(--fz-md);
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 0.2s;
    font-size: clamp(14px, 3vw, 16px);
    margin-bottom: clamp(10px, 2vw, 20px);
}

#hero-title {
    color: var(--lightest-slate);
    font-size: clamp(40px, 8vw, 80px);
    line-height: 1.1;
    margin: 0;
    font-weight: 600;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 0.4s;
    font-size: clamp(35px, 6vw, 80px);
    margin-bottom: clamp(10px, 2vw, 20px);
}

.big-heading {
    color: var(--slate);
    font-size: clamp(30px, 7vw, 60px);
    line-height: 1.1;
    font-weight: 600;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 0.6s;
    font-size: clamp(25px, 5vw, 60px);
    margin-bottom: clamp(15px, 3vw, 30px);
}

.hero-description {
    margin-top: 25px;
    max-width: 540px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 0.8s;
    max-width: min(540px, 90%);
    margin: 20px auto;
}

.hero-description p {
    color: var(--slate);
    margin-bottom: 15px;
    font-size: var(--fz-lg);
    font-size: clamp(16px, 2.5vw, 20px);
    line-height: 1.5;
    margin: 0 auto;
    padding: 0 clamp(10px, 3vw, 20px);
}

.hero-buttons {
    margin-top: 50px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 1s;
}

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

.social-links {
    display: flex;
    align-items: center;
    margin-top: 20px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 1s;
}

.social-links a {
    display: inline-block;
    color: var(--text-light);
    margin-right: 20px;
    font-size: 22px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: var(--text-accent);
    transform: translateY(-3px);
}

.cta-button {
    display: inline-block;
    color: var(--text-accent);
    border: 1px solid var(--text-accent);
    border-radius: 4px;
    padding: 12px 24px;
    font-size: 14px;
    font-family: var(--font-mono);
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 20px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 1.2s;
}

.cta-button:hover {
    background-color: rgba(100, 255, 218, 0.1);
    transform: translateY(-3px);
}


section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 100px 0;
    scroll-margin-top: 80px;
}

section h2 {
    display: flex;
    align-items: center;
    position: relative;
    margin: 10px 0 40px;
    width: 100%;
    font-size: clamp(26px, 5vw, 32px);
    color: var(--lightest-slate);
    white-space: nowrap;
}

section h2::before {
    counter-increment: section;
    content: '0' counter(section) '.';
    margin-right: 10px;
    color: var(--green);
    font-family: var(--font-mono);
    font-size: clamp(16px, 3vw, 20px);
    font-weight: 400;
}

section h2::after {
    content: '';
    display: block;
    position: relative;
    width: 300px;
    height: 1px;
    margin-left: 20px;
    background-color: var(--lightest-navy);
}


.about-content {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 50px;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 15px;
}

.about-image {
    position: relative;
    max-width: 300px;
}

.profile-img {
    border-radius: 4px;
    filter: grayscale(100%) contrast(1);
    transition: all 0.3s ease;
}

.profile-img:hover {
    filter: grayscale(0%) contrast(1.1);
}


.experience-timeline, .project-grid {
    display: grid;
    gap: 15px;
}

.experience-item, .project-card {
    background-color: var(--bg-light-dark);
    padding: 25px;
    border-radius: 4px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.experience-item:hover, .project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
}


#projects .project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

.project-card {
    background-color: var(--light-navy);
    border-radius: 4px;
    padding: 25px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: auto;
    position: relative;
    box-shadow: 0 10px 30px -15px var(--navy-shadow);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, var(--green), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px -15px var (--navy-shadow);
}

.project-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.project-header h3 {
    color: var(--lightest-slate);
    font-size: var(--fz-xl);
    margin: 0;
    transition: color 0.3s ease;
}

.project-card:hover .project-header h3 {
    color: var(--green);
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.tech-tag {
    color: var(--light-slate);
    font-size: var(--fz-xxs);
    font-family: var(--font-mono);
    white-space: nowrap;
    margin-right: 10px;
}

.project-description {
    flex-grow: 1;
    font-size: var(--fz-md);
    line-height: 1.6;
    color: var(--light-slate);
}

.project-link {
    color: var(--lightest-slate);
    transition: all 0.3s ease;
    margin-left: 10px;
}

.project-link:hover {
    color: var(--green);
    transform: translateY(-3px);
}

/* Unified Card Styling */
#education .education-card,
#experience .experience-item {
    background-color: var(--bg-light-dark);
    border-radius: 10px;
    padding: 25px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

#education .education-card::before,
#experience .experience-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--text-accent), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

#education .education-card:hover::before,
#experience .experience-item:hover::before {
    transform: scaleX(1);
}

#education .education-card:hover,
#experience .experience-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px -15px rgba(2, 12, 27, 0.8);
}

#education .education-header,
#experience .experience-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

#education .education-header h3,
#experience .experience-header h3 {
    color: var(--text-light);
    font-size: 1.2rem;
    margin: 0;
    transition: color 0.3s ease;
}

#education .education-card:hover .education-header h3,
#experience .experience-item:hover h3 {
    color: var(--text-accent);
}

#education .education-meta,
#experience .experience-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

#education .education-meta span,
#experience .experience-details span {
    display: flex;
    align-items: center;
    color: var (--text-muted);
    font-size: 0.9rem;
}

#education .education-meta i,
#experience .experience-details i {
    margin-right: 10px;
    color: var(--text-accent);
}

#education .education-description,
#experience .responsibilities {
    color: var(--text-muted);
    line-height: 1.6;
}

#education .education-highlights,
#experience .responsibilities {
    list-style-type: none;
    padding-left: 0;
}

#education .education-highlights li,
#experience .responsibilities li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
}

#education .education-highlights li::before,
#experience .responsibilities li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--text-accent);
}

#education .education-card {
    margin-bottom: 20px;
}

#education .education-details {
    line-height: 1.6;
}

#education .education-description {
    display: flex;
    flex-direction: column;
}

#education .education-description strong {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 5px;
}

#education .education-description span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Comprehensive Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 0 40px;
    }

    #hero .hero-content {
        padding: 0 20px;
    }

    .hero-content h1 {
        font-size: clamp(12px, 4vw, 14px);
    }

    .hero-content h2,
    .hero-content h3 {
        font-size: clamp(30px, 7vw, 70px);
    }
}

@media (max-width: 768px) {
    /* Global Responsive Adjustments */
    .container {
        padding: 0 25px;
    }

    /* Navigation */
    header {
        justify-content: center;
    }

    nav ul {
        display: none; /* Consider implementing mobile menu */
    }

    /* Hero Section */
    #hero {
        text-align: center;
        align-items: center;
    }

    .hero-content {
        text-align: center;
        align-items: center;
        padding: 0 15px;
    }

    .pre-heading {
        font-size: clamp(13px, 2.5vw, 15px);
    }

    #hero-title {
        font-size: clamp(28px, 5vw, 40px);
    }

    .big-heading {
        font-size: clamp(22px, 4vw, 35px);
    }

    .hero-description p {
        font-size: clamp(14px, 2vw, 18px);
        padding: 0 10px;
    }

    .social-links {
        justify-content: center;
    }

    /* Sections */
    section {
        padding: 50px 0;
    }

    section h2 {
        font-size: 2rem;
        text-align: center;
    }

    section h2::after {
        width: 100px;
        margin: 10px auto;
    }

    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .about-text {
        text-align: center;
    }

    .tech-stack {
        justify-content: center;
    }

    /* Projects, Education, Experience Grid */
    #projects .project-grid,
    #education,
    #experience {
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Cards */
    .project-card,
    .education-card,
    .experience-item {
        width: 100%;
    }

    /* Skills */
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Contact */
    .contact-form {
        grid-template-columns: 1fr;
    }

    .project-card {
        padding: 20px;
    }

    .project-header {
        gap: 10px;
    }

    .project-links {
        gap: 6px;
    }

    .tech-tag {
        font-size: 0.65rem;
        padding: 3px 6px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-content {
        padding: 0 10px;
    }

    .pre-heading {
        font-size: clamp(12px, 2vw, 14px);
    }

    #hero-title {
        font-size: clamp(25px, 4vw, 35px);
    }

    .big-heading {
        font-size: clamp(20px, 3.5vw, 30px);
    }

    .hero-description p {
        font-size: clamp(13px, 1.8vw, 16px);
        padding: 0 5px;
    }

    .hero-content h1 {
        font-size: clamp(10px, 3vw, 12px);
    }

    .hero-content h2,
    .hero-content h3 {
        font-size: clamp(25px, 6vw, 50px);
    }

    .social-links a {
        font-size: 18px;
        margin-right: 15px;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    /* Tighter typography for smaller screens */
    p, li {
        font-size: 0.9rem;
    }

    #projects .project-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        padding: 15px;
    }

    .tech-tag {
        font-size: 0.65rem;
        padding: 3px 6px;
    }
}

/* Accessibility and Performance Enhancements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }

    .container {
        max-width: none;
        padding: 0;
    }

    header, footer {
        display: none;
    }
}

/* Footer */
footer {
    padding: 40px 0;
    text-align: center;
    background-color: var(--navy);
    color: var(--slate);
    font-size: var(--fz-sm);
    font-family: var(--font-mono);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-social {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
}

.footer-social a {
    color: var(--light-slate);
    font-size: var(--fz-xl);
    transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.footer-social a:hover {
    color: var(--green);
    transform: translateY(-3px);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darkest);
}

::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 6px;
}

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

/* Subtle Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse-hover:hover {
    animation: pulse 1s infinite;
}

/* Detailed Project Card Responsive Design */
@media (max-width: 1200px) {
    #projects .project-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }

    .project-card {
        max-width: 100%;
    }
}

@media (max-width: 992px) {
    #projects .project-grid {
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
        gap: 15px;
    }

    .project-card {
        padding: 20px;
    }

    .project-header h3 {
        font-size: 1.1rem;
    }

    .project-links .tech-tag {
        font-size: 0.65rem;
    }
}

@media (max-width: 768px) {
    #projects .project-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .project-card {
        width: 100%;
        display: flex;
        flex-direction: column;
    }

    .project-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 10px;
    }

    .project-header h3 {
        margin-bottom: 10px;
        width: 100%;
    }

    .project-links {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
    }

    .project-links .tech-tag {
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {
    .project-card {
        padding: 15px;
    }

    .project-description p {
        font-size: 0.85rem;
    }

    .project-links .tech-tag {
        font-size: 0.6rem;
        padding: 3px 6px;
    }
}

/* Hover and Interaction Adjustments for Mobile */
@media (hover: none) and (pointer: coarse) {
    .project-card:hover {
        transform: none;
        box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
    }

    .project-card::before {
        display: none;
    }
}

/* Amélioration du smooth scroll */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* Ajustements pour les très grands écrans */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
        padding: 80px 100px 0;
    }

    #projects .project-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 colonnes fixes pour grands écrans */
        gap: 30px;
    }

    .project-card {
        min-height: 300px; /* Plus d'espace pour le contenu */
    }

    section {
        max-width: 1200px;
        padding: 120px 0;
    }
}

/* Ajustements pour tablettes et écrans moyens */
@media (max-width: 992px) {
    .container {
        padding: 80px 30px 0;
    }

    #projects .project-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 colonnes pour écrans moyens */
        gap: 20px;
    }

    .project-card {
        min-height: 280px;
    }

    nav ul {
        gap: 15px;
    }
}

/* Ajustements pour petits écrans et mobiles */
@media (max-width: 768px) {
    header {
        padding: 10px 15px;
    }

    .container {
        padding: 60px 20px 0;
    }

    #projects .project-grid {
        grid-template-columns: 1fr; /* 1 colonne pour mobile */
        gap: 20px;
    }

    .project-card {
        min-height: auto; /* Hauteur adaptative */
        padding: 20px;
    }

    .hero-content h1 {
        font-size: clamp(12px, 4vw, 14px);
    }

    .hero-content h2,
    .hero-content h3 {
        font-size: clamp(28px, 6vw, 40px);
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .about-image {
        max-width: 250px;
        margin: 0 auto;
    }
}

/* Ajustements pour très petits écrans */
@media (max-width: 480px) {
    .container {
        padding: 60px 15px 0;
    }

    header {
        padding: 10px;
        height: 70px;
    }

    .project-card {
        padding: 15px;
    }

    .tech-tag {
        font-size: 0.65rem;
        padding: 3px 6px;
    }

    .hero-content h1 {
        font-size: clamp(10px, 3vw, 12px);
    }

    .hero-content h2,
    .hero-content h3 {
        font-size: clamp(24px, 5vw, 32px);
    }

    section {
        padding: 40px 0;
    }

    .about-image {
        max-width: 200px;
    }

    .social-links a {
        font-size: 16px;
        margin-right: 12px;
    }

    .cta-button {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* Ajustements pour les écrans en mode paysage mobile */
@media (max-height: 600px) and (orientation: landscape) {
    #hero {
        min-height: auto;
        padding: 100px 0;
    }

    .hero-content {
        padding: 20px 0;
    }

    .project-card {
        min-height: auto;
    }
}

/* Optimisations pour les appareils à haute densité de pixels */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .profile-img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Menu Burger */
.burger-menu {
    display: none;
    cursor: pointer;
    z-index: 1001;
    position: relative;
}

.burger-bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Navigation mobile */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(10px);
    padding-top: 100px;
    transition: all 0.3s ease-in-out;
    z-index: 1000;
}

/* Media query pour le menu burger */
@media (max-width: 768px) {
    .burger-menu {
        display: block;
    }

    nav ul {
        display: none;
    }

    .mobile-nav {
        display: block;
    }

    .mobile-nav.active {
        right: 0;
    }

    .mobile-nav ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 30px;
        padding: 0;
        margin: 0;
    }

    .mobile-nav ul li {
        opacity: 0;
        transform: translateY(20px);
        animation: fadeInUp 0.3s ease forwards;
    }

    .mobile-nav.active ul li {
        opacity: 1;
        transform: translateY(0);
    }

    /* Animation du burger */
    .burger-menu.active .burger-bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .burger-menu.active .burger-bar:nth-child(2) {
        opacity: 0;
    }

    .burger-menu.active .burger-bar:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

/* Gestion du défilement */
body.no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Animation pour les liens du menu mobile */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Style du menu déroulant */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-toggle i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-dark);
    min-width: 200px;
    padding: 10px 0;
    border-radius: 4px;
    box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 0;
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 8px 20px;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
}

.dropdown-menu a:hover {
    background-color: var(--bg-light-dark);
    color: var(--text-accent);
    padding-left: 25px;
}

/* Ajustements pour mobile */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .mobile-nav .dropdown-menu {
        position: static;
        background-color: transparent;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding-left: 20px;
    }

    .mobile-nav .dropdown-toggle i {
        display: none;
    }

    .mobile-nav .dropdown-menu a {
        padding: 10px 0;
        font-size: 0.9rem;
        color: var(--text-muted);
    }

    .mobile-nav .dropdown-menu a:hover {
        padding-left: 5px;
    }
}

/* Ajout pour le menu déroulant */
.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-toggle.active i {
    transform: rotate(180deg);
}

/* Ajustement pour mobile */
@media (max-width: 768px) {
    .mobile-nav .dropdown-menu.show {
        display: block;
        opacity: 1;
        visibility: visible;
    }
    
    .mobile-nav .dropdown {
        width: 100%;
        text-align: center;
    }
    
    .mobile-nav .dropdown-menu {
        width: 100%;
        text-align: center;
        padding: 10px 0;
    }
}

/* Styles pour le menu mobile actif */
.mobile-nav.active {
    right: 0;
    opacity: 1;
    visibility: visible;
}

/* Style pour le menu déroulant mobile */
.mobile-nav .dropdown-menu {
    display: none;
    padding-left: 20px;
}

.mobile-nav .dropdown-menu.show {
    display: block;
}

/* Ajustement du z-index */
header {
    z-index: 1000;
}

.burger-menu {
    z-index: 1001;
}

.mobile-nav {
    z-index: 999;
}

/* Empêcher le défilement quand le menu est ouvert */
body.no-scroll {
    overflow: hidden;
}

/* Animation du menu burger */
.burger-menu.active .burger-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.active .burger-bar:nth-child(2) {
    opacity: 0;
}

.burger-menu.active .burger-bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}

.modal-content {
    background-color: #2c3e50;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 500px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #fff;
}

.vote-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.vote-option {
    padding: 15px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    transition: background-color 0.3s;
}

.vote-option:hover {
    background-color: #2980b9;
}

.try-button {
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.try-button:hover {
    background-color: #2980b9;
}

/* Menu Hamburger amélioré */
.burger-menu {
    display: none;
    width: 30px;
    height: 24px;
    position: relative;
    cursor: pointer;
    z-index: 1001;
}

.burger-bar {
    width: 100%;
    height: 2px;
    background-color: var(--green);
    position: absolute;
    transition: all 0.3s ease-in-out;
}

.burger-bar:nth-child(1) { top: 0; }
.burger-bar:nth-child(2) { top: 50%; transform: translateY(-50%); }
.burger-bar:nth-child(3) { bottom: 0; }

/* Animation du menu hamburger */
.burger-menu.active .burger-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 9px);
}

.burger-menu.active .burger-bar:nth-child(2) {
    opacity: 0;
}

.burger-menu.active .burger-bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -9px);
}

/* Navigation Mobile */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--light-navy);
    padding: 100px 30px;
    transition: all 0.3s ease-in-out;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.mobile-nav.active {
    right: 0;
    opacity: 1;
    visibility: visible;
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
    margin-bottom: 30px;
}

.mobile-nav ul li {
    margin: 20px 0;
    font-size: clamp(16px, 4vw, 20px);
}

.mobile-nav .cta-button {
    margin-top: 30px;
    font-size: clamp(14px, 3vw, 16px);
    padding: 15px 30px;
}

/* Responsive Design amélioré */
@media (max-width: 1200px) {
    .container {
        padding: 0 50px;
    }
    
    .about-content {
        gap: 30px;
    }
}

@media (max-width: 992px) {
    .container {
        padding: 0 30px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    /* Affichage du menu hamburger */
    .burger-menu {
        display: block;
    }

    /* Cacher la navigation desktop */
    nav ul {
        display: none;
    }

    /* Ajustements du contenu */
    .hero-content {
        text-align: center;
    }

    .hero-content h1 {
        font-size: clamp(35px, 8vw, 50px);
    }

    .about-content {
        padding: 0;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .education-card, .experience-item {
        margin: 15px 0;
    }

    .hero-content h1 {
        font-size: clamp(30px, 6vw, 40px);
    }

    .hero-content .pre-heading {
        font-size: clamp(14px, 3vw, 16px);
    }

    .hero-description p {
        font-size: clamp(14px, 3vw, 16px);
        padding: 0 15px;
    }

    section h2 {
        font-size: clamp(24px, 5vw, 28px);
    }

    .about-text p, 
    .education-description p,
    .project-description p {
        font-size: clamp(14px, 3vw, 16px);
        line-height: 1.6;
    }

    .tech-stack li {
        font-size: clamp(13px, 2.5vw, 15px);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }

    .hero-content {
        padding: 120px 0 60px;
    }

    .section-title {
        font-size: 24px;
    }

    .mobile-nav {
        padding: 80px 20px;
    }

    .mobile-nav ul li {
        font-size: clamp(14px, 3.5vw, 18px);
    }

    .mobile-nav .cta-button {
        padding: 12px 25px;
        font-size: clamp(13px, 2.5vw, 15px);
    }

    .hero-description p {
        padding: 0 10px;
    }

    .project-card {
        padding: 15px;
    }
}

/* Ajustements pour les très petits écrans */
@media (max-width: 320px) {
    .container {
        padding: 0 15px;
    }

    .hero-content h1 {
        font-size: clamp(28px, 7vw, 35px);
    }

    .mobile-nav {
        padding: 60px 15px;
    }
}

/* Ajustements pour les écrans haute résolution */
@media (min-width: 1400px) {
    .container {
        max-width: 1300px;
    }
    
    .project-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Fix pour le scroll lors de l'ouverture du menu */
body.menu-open {
    overflow: hidden;
}