/* Variables - Premium Dark Theme with Vibrant Accents */
:root {
    --bg-base: #020617;
    /* Slate 950 */
    --bg-surface: #0f172a99;
    /* Slate 900 Glass */
    --bg-surface-hover: rgba(30, 41, 59, .9);

    --text-main: #f8fafc;
    /* Slate 50 */
    --text-muted: #95A6BC;
    /* Slate 400 */

    --accent-1: #3b82f6;
    /* Blue 500 */
    --accent-2: #8b5cf6;
    /* Violet 500 */
    --accent-gradient: linear-gradient(135deg, var(--accent-1), var(--accent-2));

    --border-glass: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);

    --shadow-sm: 0 4px 6px -1px rgb(0 0 0 / 0.3);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.4);
    --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.15);

    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 9999px;

    --pointer-def: default;

    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

#profile-bento p {
    margin: 5px 0;
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Typography Helpers */
.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Background Effects (Orbs) */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.5;
    animation: float 20s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: rgba(59, 130, 246, 0.15);
}

.blob-2 {
    bottom: 20%;
    right: -10%;
    width: 40vw;
    height: 40vw;
    background: rgba(139, 92, 246, 0.15);
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(5%, 5%) scale(1.1);
    }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    z-index: 100;
    transition: var(--transition);
}

.navbar.scrolled .nav-container {
    background: rgba(15, 23, 42, 0.8);
    box-shadow: var(--shadow-md);
    padding: 0.75rem 1.5rem;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-pill);
    padding: 1rem 2rem;
    position: relative;
    transition: var(--transition);

    /* Intro Animation Properties */
    margin: 0 auto;
    width: 190px;
    opacity: 0;
    animation: navExpand 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.3s;
}

/* The gradient border itself */
.nav-container::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-pill);
    padding: 2px;
    /* Border thickness */
    background: linear-gradient(90deg, #ff0080, #7928ca, #ff0080, #00d2ff, #3a7bd5, #7928ca, #ff0080);
    background-size: 300% 100%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    animation: neonBg 10s linear infinite;
}

/* The neon glow */
.nav-container::after {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    background: linear-gradient(90deg, #ff0080, #7928ca, #ff0080, #00d2ff, #3a7bd5, #ff0080);
    background-size: 300% 100%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    filter: blur(8px);
    border-radius: var(--radius-pill);
    z-index: -1;
    opacity: 0.7;
    animation: neonBg 60s linear infinite;
}

@keyframes neonBg {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-main);
    flex-shrink: 0;
    white-space: nowrap;
}

.logo-icon {
    color: var(--accent-1);
}

.desktop-nav {
    display: flex;
    gap: 2rem;
}

@media (min-width: 769px) {
    .desktop-nav {
        opacity: 0;
        animation: navItemsFadeIn 0.5s ease forwards 1.8s;
    }
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-main);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    animation: navItemsFadeIn 0.5s ease forwards 1.8s;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
}

/* Navbar Intro Animations */
@keyframes navExpand {
    0% {
        opacity: 0;
        width: 190px;
    }

    30% {
        opacity: 1;
        width: 190px;
    }

    45% {
        opacity: 1;
        width: 190px;
    }

    100% {
        opacity: 1;
        width: 100%;
    }
}

@keyframes navItemsFadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    border-radius: var(--radius-pill);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-sm {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

/* Layout Utilities */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Section Common */
section {
    padding: 8rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12rem;
    gap: 4rem;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.badge-wrapper {
    margin-bottom: 2rem;
    cursor: var(--pointer-def);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #10b981;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
}

.badge:hover {
    background: rgba(16, 185, 129, 0.281);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-subtitle strong {
    color: var(--text-main);
}

.hero-cta {
    display: flex;
    gap: 1rem;
}

/* Hero Visual / Abstract Art */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.code-window-wrapper {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    perspective: 1000px;
}

.code-window {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 30px rgba(59, 130, 246, 0.2);
    transform: rotateY(-10deg) rotateX(5deg);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: left;
}

.code-window:hover {
    transform: rotateY(0) rotateX(0) scale(1.02);
    box-shadow: 0 35px 60px -15px rgba(0, 0, 0, 0.6), 0 0 40px rgba(59, 130, 246, 0.3);
}

.code-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
}

.mac-btns {
    display: flex;
    gap: 0.5rem;
}

.mac-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.mac-btn.close-btn {
    background: #ef4444;
}

.mac-btn.minimize-btn {
    background: #eab308;
}

.mac-btn.expand-btn {
    background: #22c55e;
}

.code-title {
    flex: 1;
    text-align: center;
    font-family: 'Consolas', 'Monaco', monospace;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding-right: 3.5rem;
    /* Balance mac-btns width */
}

.code-body {
    padding: 1.5rem;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.95rem;
    line-height: 1.7;
    overflow-x: auto;
}

.code-body pre {
    margin: 0;
}

/* Terminal Styling */
.terminal-window {
    height: 200px;
    background: rgba(10, 10, 10, 0.95);
}

.terminal-body {
    font-size: 1.1rem;
    color: #f8f8f2;
}

.terminal-line {
    display: block;
    line-height: 1.8;
}

.prompt {
    color: #a6e22e;
    margin-right: 0.75rem;
    font-weight: 700;
}

.typewriter-text {
    color: #f8f8f2;
}

.code-cursor {
    display: inline-block;
    width: 8px;
    height: 1.1em;
    background-color: var(--text-main);
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
    margin-left: 4px;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.floating-badge {
    position: absolute;
    background: var(--bg-surface);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    animation: float-y 4s ease-in-out infinite alternate;
}

.fb-1 {
    top: 10%;
    left: -10%;
}

.fb-2 {
    bottom: 15%;
    right: -5%;
    animation-delay: -2s;
}

.icon-react {
    color: #facc15;
}

/* JS color */
.icon-java {
    color: #10b981;
}

/* Spring color */

@keyframes float-y {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-15px);
    }
}

/* About Section */
.about-section {
    padding: 8rem 0 4rem 0;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-glow);
}

.about-image-wrapper {
    flex: 0 0 280px;
    position: relative;
    border-radius: var(--radius-lg);
}

.about-image {
    width: 100%;
    height: 380px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    border: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
}

.about-image-wrapper .neon-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    background: var(--accent-gradient);
    filter: blur(30px);
    z-index: 1;
    opacity: 0.6;
    border-radius: 50%;
}

.about-text {
    flex: 1;
}

.about-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    line-height: 1.8;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-text strong {
    color: var(--text-main);
}

/* Bento Grid System */
.bento-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(150px, auto);
    gap: 1.5rem;
}

.bento-box {
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.bento-box:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-hover);
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

.bento-large {
    grid-column: span 3;
}

.bento-medium {
    grid-column: span 2;
}

.bento-small {
    grid-column: span 1;
}

.bento-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--accent-1);
    cursor: var(--pointer-def);
}

.bento-box h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.bento-box p {
    color: var(--text-muted);
}

/* Skill Tags */
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.skill-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    color: var(--text-main);
    transition: var(--transition);
    cursor: var(--pointer-def);
}

.skill-tag:hover {
    background: var(--accent-gradient);
    border-color: transparent;
    transform: scale(1.05);
}

.language-list {
    list-style: none;
    margin-top: auto;
}

.language-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-glass);
    color: var(--text-muted);
}

.language-list li:last-child {
    border-bottom: none;
}

.language-list strong {
    color: var(--text-main);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

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

.project-image {
    height: 220px;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.project-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex: 1;
}

.project-links {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
    flex-wrap: wrap;
}

.project-btn {
    flex: 1;
    min-width: 120px;
    border-radius: 10px !important;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
}

/* Contact Forms */
.contact-section {
    padding-bottom: 10rem;
}

.contact-card {
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    box-shadow: var(--shadow-glow);
}

.contact-info h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.contact-methods {
    list-style: none;
}

.contact-methods li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-methods .icons {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-1);
    cursor: var(--pointer-def);
}

.contact-methods a,
.contact-methods li>span:not(.material-symbols-outlined) {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.contact-methods a:hover {
    color: var(--accent-1);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-1);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-status {
    margin-top: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

.form-status.success {
    color: #10b981;
}
/* ----- Footer ----- */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 1.5rem 2rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Logo */
.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Copyright */
.footer-copy {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.28);
  margin: 0;
  text-align: center;
  flex: 1;
}

/* Icônes réseaux */
.footer-socials {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.4;
  transition: opacity 0.25s ease;
}

.footer-social-link:hover {
  opacity: 1;
}

.footer-social-link img {
  width: 25px;
  height: 25px;
  object-fit: contain;
}

/* ----- Responsive mobile ----- */
@media (max-width: 640px) {
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.85rem;
  }

  .footer-copy {
    order: 3;
    flex: unset;
  }

  .footer-socials {
    order: 2;
  }

  .footer-logo {
    order: 1;
  }

}
/* Animations (Intersection Observer Targets) */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

/* Toast Notification */
#toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    cursor: default;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success .material-symbols-outlined {
    color: #10b981;
}

.toast-message {
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .bento-large {
        grid-column: span 3;
    }

    .bento-medium {
        grid-column: span 3;
    }

    .bento-small {
        grid-column: span 3;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .contact-card {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 3rem 2rem;
    }
}

@media (max-width: 768px) {

    /* Mobile Menu Logic */
    .desktop-nav {
        position: absolute;
        top: 120%;
        left: 0;
        width: 100%;
        height: auto;
        padding: 2rem 0;
        background: var(--bg-surface-hover);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-radius: var(--radius-lg);
        border: 1px solid var(--border-glass);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        z-index: 100;

        /* Hide by default */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: var(--transition);
        pointer-events: none;
    }

    .desktop-nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    .nav-actions {
        z-index: 101;
    }

    .nav-actions .btn {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    /* Global Spacing */
    main {
        padding: 0 1rem;
    }

    section {
        padding: 4rem 0;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    /* Hero Adjustments */
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding-top: 8rem;
        gap: 2rem;
    }

    .hero-cta {
        justify-content: center;
    }

    /* Code Window Mobile Adjustments */
    .code-window-wrapper {
        margin-top: 1rem;
        width: 350px;
    }

    .code-window {
        transform: rotateY(0) rotateX(0);
    }

    .code-body {
        font-size: 0.8rem;
        padding: 1rem;
    }

    /* About Adjustments */
    .about-content {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
        gap: 2rem;
    }

    .about-image-wrapper {
        width: 220px;
    }

    .about-image {
        height: 280px;
    }

    /* Bento Grid */
    .bento-box {
        padding: 1.5rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    /* Projects Grid */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-content {
        padding: 1.5rem;
    }

    /* Contact Adjustments */
    .contact-card {
        padding: 2rem 1.5rem;
    }

    .contact-info h2 {
        font-size: 2rem;
    }
}

/* --- Loader Styles --- */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-base);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.8s cubic-bezier(0.7, 0, 0.3, 1);
}

.loader.slide-up {
    transform: translateY(-100%);
}

.loader-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    animation: loaderPulse 2s infinite;
}

.loader-icon {
    color: var(--accent-1);
}

@keyframes loaderPulse {
    0% {
        opacity: 0.6;
        transform: scale(0.98);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0.6;
        transform: scale(0.98);
    }
}

body.loading {
    overflow: hidden;
}

body.loading .nav-container,
body.loading .desktop-nav,
body.loading .nav-actions {
    animation: none !important;
}

@keyframes spin {
    100% {
        transform: rotate(-360deg);
    }
}

/* ========================================
   NEW STYLES — Plan d'amélioration
   ======================================== */

/* CV Download Button */
.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--text-main);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Hero Experience Badge */
.hero-experience {
    display: inline-block;
    font-size: 0.70rem;
    font-weight: 600;
    color: var(--accent-1);
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    padding: 0.2rem 0.7rem;
    border-radius: var(--radius-pill);
    margin-top: 0.25rem;
    cursor: default;
    transition: var(--transition);
}

.hero-experience:hover {
    background: rgba(59, 131, 246, 0.2);
}

/* ---- Experience / Timeline Section ---- */
.experience-section {
    padding: 8rem 0;
}

/*
 * Layout logic (single source of truth via --tl-gutter):
 *   - The vertical line lives at   left: calc(var(--tl-gutter) / 2)  on .timeline
 *   - The dot (16px wide) is at    left: calc(var(--tl-gutter)/2 - 8px)  on .timeline-item
 *   - Card content starts at       padding-left: var(--tl-gutter)   on .timeline-item
 */
.timeline {
    --tl-gutter: 52px;
    /* distance from left edge of timeline to left edge of cards */
    --tl-line-x: calc(var(--tl-gutter) / 2);
    /* center of the vertical line */
    --tl-dot-size: 14px;

    position: relative;
    max-width: 860px;
    margin: 0 auto;
}

/* The vertical gradient line — fades to transparent at both ends */
.timeline::before {
    content: '';
    position: absolute;
    left: var(--tl-line-x);
    top: calc(var(--tl-dot-size) / 2);
    bottom: calc(var(--tl-dot-size) / 2);
    width: 2px; 
    transform: translateX(-50%);
    background: linear-gradient(180deg,
            transparent 0%,
            var(--accent-1) 15%,
            var(--accent-2) 75%,
            transparent 100%);
    border-radius: 2px;
    opacity: 0.7;
}

.timeline-item {
    position: relative;
    padding: 0 0 2.5rem var(--tl-gutter);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

/* The dot — centered on the line */
.timeline-dot {
    position: absolute;
    left: calc(var(--tl-line-x) - var(--tl-dot-size) / 2);
    top: 1.25rem;
    /* aligned with the card title area */
    width: var(--tl-dot-size);
    height: var(--tl-dot-size);
    border-radius: 50%;
    background: var(--accent-gradient);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15),
        0 0 12px rgba(59, 130, 246, 0.5);
    border: 2px solid var(--bg-base);
    z-index: 1;
}

/* Pulsing ring on the first (current) item */
.timeline-item:first-child .timeline-dot::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid rgba(59, 130, 246, 0.4);
    animation: timeline-pulse 2.5s ease-out infinite;
}

@keyframes timeline-pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    70% {
        transform: scale(1.8);
        opacity: 0;
    }

    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

/* Card */
.timeline-content {
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 2rem 2.5rem;
    transition: var(--transition);
    position: relative;
}

/* Connector notch: small horizontal line from the vertical bar to the card edge */
.timeline-content::before {
    content: '';
    position: absolute;
    left: -3rem;
    top: calc(1.25rem + 8px - 1px);
    /* dot center: top(1.25rem) + half-dot(8px) - line-half(1px) */
    width: 2rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-hover));
}

.timeline-content:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-hover);
    transform: translateX(6px);
    box-shadow: var(--shadow-glow);
}

.timeline-date {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-1);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 0.25rem 0.8rem;
    border-radius: var(--radius-pill);
}

.timeline-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: var(--text-main);
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 0.97rem;
    line-height: 1.75;
    margin-bottom: 1.25rem;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Toast error color */
.toast-error .material-symbols-outlined {
    color: #ef4444;
}

/* ---- Responsive additions ---- */
@media (max-width: 768px) {
    .hero-cta {
        flex-wrap: wrap;
    }

    .timeline {
        --tl-gutter: 36px;
    }

    .timeline-content {
        padding: 1.5rem;
    }

    .timeline-content::before {
        left: -2rem;
        width: 1.5rem;
    }

    .project-btn {
        min-width: 100px;
    }
}