@font-face {
    font-family: 'Poppins-Regular';
    src: url('fonts/Poppins-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins-Bold';
    src: url('fonts/Poppins-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins-Italic';
    src: url('fonts/Poppins-Italic.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

:root {
    --blue: #238de4;
    --primary: #48A6A7;
    --primaryhover: #81cbd3;
    --bg: #181c24;
    --bgtr: rgba(40, 44, 54, 0.7);
    --txt: #f7f7fa;
    --overlay-dark: rgba(10, 18, 40, 0.68);
    --overlay-blur: blur(8px);
    --green: #1ecb5c;
    --gold: #ffb800;
    --warm: #ffefc1;
    --navbar-bg: rgba(24, 28, 36, 0.98);
    --navbar-txt: #fff;
    --navbar-shadow: 0 2px 16px 0 rgba(35, 141, 228, 0.10);
    --skill-bg: #232b3e;
    --skill-hover: #48A6A7;
    --primary-bold: #48A6A7;

    /* Surfaces (dark defaults) */
    --surface: rgba(40, 44, 54, 0.7);
    --surface-alt: rgba(35, 43, 62, 0.6);
    --surface-card: rgba(35, 43, 62, 0.4);
    --surface-popup: #232b3e;
    --surface-diploma: #181c24;
    --border-subtle: rgba(129, 203, 211, 0.08);
    --border-accent: rgba(129, 203, 211, 0.06);
    --txt-secondary: #e0e0e0;
    --txt-muted: #b0b8c8;
    --txt-faint: #aaa;
    --shadow-color: rgba(35, 141, 228, 0.06);
    --shadow-card: rgba(10, 18, 40, 0.25);
    --overlay-bg: rgba(10, 18, 40, 0.85);
    --body-gradient: linear-gradient(160deg, #1a1f2e 0%, #181c24 40%, #1e2233 100%);
    --scrollbar-thumb: linear-gradient(120deg, var(--bg) 0%, var(--primary) 50%);
    --icon-filter: none;
}

/* ===== LIGHT THEME ===== */
[data-theme="light"] {
    --bg: #edf1f8;
    --bgtr: rgba(235, 239, 248, 0.88);
    --txt: #1a1d2e;
    --navbar-bg: rgba(240, 243, 250, 0.95);
    --navbar-txt: #1a1d2e;
    --navbar-shadow: 0 2px 16px 0 rgba(35, 141, 228, 0.08);
    --skill-bg: #dfe4f0;
    --primary-bold: #2e8384;
    --surface: rgba(245, 248, 255, 0.78);
    --surface-alt: rgba(228, 234, 248, 0.7);
    --surface-card: rgba(225, 230, 242, 0.75);
    --surface-popup: #f5f7fc;
    --surface-diploma: #e8ecf6;
    --border-subtle: rgba(72, 166, 167, 0.15);
    --border-accent: rgba(72, 166, 167, 0.10);
    --txt-secondary: #3a3f52;
    --txt-muted: #6b7280;
    --txt-faint: #9ca3af;
    --shadow-color: rgba(35, 141, 228, 0.05);
    --shadow-card: rgba(35, 100, 180, 0.10);
    --overlay-bg: rgba(237, 241, 248, 0.92);
    --body-gradient: linear-gradient(160deg, #dce2ef 0%, #edf1f8 40%, #e4e9f4 100%);
    --scrollbar-thumb: linear-gradient(120deg, #c5cad8 0%, var(--primary) 50%);
    --icon-filter: brightness(0.2);
}

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    border: none;
    text-decoration: none;
    list-style: none;
}

::-webkit-scrollbar {
    width: .5em;
    height: 1vmin;
}

::-webkit-scrollbar-button {
    width: 0px;
    height: 0px;
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border: none;
}

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

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(120deg, var(--bg) 0%, var(--primaryhover) 30%);
    border: none;
    border-radius: 50px;
}

::-webkit-scrollbar-track:hover {
    background: var(--bg);
    border: none;
    border-radius: 0px;
}

::-webkit-scrollbar-corner {
    background: transparent;
}

::-moz-selection {
    background-color: #48a5a751;
}

::selection {
    background-color: #48a5a751;
}

html {
    scroll-behavior: smooth;
    background: var(--bg);
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: 'Poppins-Regular', Arial, sans-serif;
    background: var(--bg);
    color: var(--txt);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    max-width: 100vw;
}

/* Subtle background gradient */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: var(--body-gradient);
    pointer-events: none;
    transition: background 0.4s ease;
}

button {
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

button:hover {
    transform: translateY(-2px);
}

.lang-switch-topright {
    position: fixed;
    top: 2em;
    right: 2em;
    z-index: 2001;
}

#lang-switch {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.2em;
    padding: 0.4em 0.8em;
    border-radius: 2.5em;
    box-shadow: 0 4px 12px 0 var(--shadow-color);
    background: var(--navbar-bg);
    transition: background 0.2s;
    animation: occasionalJump 12s infinite cubic-bezier(.4, 0, .2, 1);
}

@keyframes occasionalJump {

    0%,
    90%,
    100% {
        transform: translateY(0);
    }

    92% {
        transform: translateY(-8px);
    }

    94% {
        transform: translateY(0);
    }

    96% {
        transform: translateY(-4px);
    }

    98% {
        transform: translateY(0);
    }
}

#lang-switch img {
    width: 2.5em;
    height: 2.5em;
    filter: drop-shadow(0 0 2px var(--primary));
}

#lang-switch:hover {
    background: var(--primary);
}

.wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100vw;
    padding-top: .5em;
    padding-bottom: .5em;
}

section {
    width: 100%;
    max-width: 1200px;
    padding-top: 5em;
    padding-bottom: 5em;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    background: none;
    box-shadow: none;
    border-radius: 0;
    border: none;
    min-height: unset;
    justify-content: flex-start;
    position: relative;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    overflow: visible;
}

.section-card {
    width: 100%;
    border-radius: 2.5em;
    background: var(--surface);
    box-shadow: 0 8px 48px 0 var(--shadow-color);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 510px;
    box-sizing: border-box;
    padding: 2em;
    contain: layout style paint;
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Remove card look on about — open hero style */
#about .section-card {
    border-radius: 2.5em;
}

/* Skills: softer card, asymmetric accent */
#skills .section-card {
    border-radius: 3em 1em 3em 1em;
    background: var(--surface);
    border: 1px solid var(--border-accent);
}

/* Projects: card style */
#projects .section-card {
    border-radius: 1em 2.5em 1em 2.5em;
}

/* Skip rendering of off-screen sections (major paint optimization) */
#skills,
#projects {
    content-visibility: auto;
    contain-intrinsic-size: auto 800px;
}

.section-title {
    font-size: clamp(1.7em, 4vw, 2.2em);
    font-weight: bold;
    color: var(--primary);
    text-align: center;
    margin: 0;
    letter-spacing: 0.01em;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primaryhover) 50%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.5em;
    margin-top: 0;
    text-align: center;
}

.name-diploma {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.1em;
    justify-content: space-between;
}

#age {
    color: var(--primaryhover);
    margin-top: -0.8em;
    margin-bottom: 0.7em;
    font-size: 1.1em;
    font-weight: bold;
    display: block;
    position: relative;
    cursor: default;
    width: fit-content;
}

#age::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    top: 110%;
    transform: translateX(-50%) translateY(4px);
    background: var(--bg2, #23232b);
    color: var(--txt);
    font-size: 0.82em;
    font-weight: 600;
    padding: 0.35em 0.7em;
    border-radius: 8px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.22s, transform 0.22s;
    box-shadow: 0 2px 12px rgba(0,0,0,.18);
    z-index: 10;
}

#age:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.home-role {
    color: var(--txt) !important;
}

.about-content h2 {
    color: var(--blue);
    font-size: 1.1em;
    font-family: 'Poppins-Bold', Arial, sans-serif;
    margin-bottom: 0.7em;
    margin-top: 0;
}

.about-text h3 {
    font-size: 1.3em;
    color: var(--primary);
    margin-bottom: 0.7em;
}

.about-text p {
    color: var(--txt);
    font-size: 1.08em;
    margin-bottom: 1em;
    line-height: 1.7;
    overflow: visible;
    word-break: break-word;
}

.about-text a {
    color: var(--primary);
    text-decoration: underline;
    font-weight: bold;
}

.about-passion {
    display: inline-block;
    margin-top: 0.6em;
    font-style: italic;
    color: var(--txt-muted);
}

.about-passion .primary-bold {
    color: var(--txt-muted);
    font-weight: 600;
}

.primary-bold {
    color: var(--primary-bold);
    font-weight: bold;
}

.about-contacts {
    display: flex;
    gap: 1.5em;
    margin-top: 1.2em;
    flex-wrap: wrap;
    justify-content: center;
}

.about-contacts .contact-link {
    color: var(--primary);
    font-size: 1.1em;
    font-weight: bold;
    border-bottom: 2px solid transparent;
    transition: border 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4em;
    background: var(--surface-alt);
    padding: 0.5em 1.2em;
    border-radius: 2em;
    box-shadow: 0 1px 6px 0 var(--shadow-color);
    border: 1px solid var(--border-subtle);
}

.about-contacts .contact-link:hover {
    color: #fff;
    border-bottom: 2px solid transparent;
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px 0 rgba(72, 166, 167, 0.2);
}

.about-contacts .contact-link .icon-inline {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.skills-section,
.projects-section {
    min-height: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 2em;
}

.skills-row {
    display: flex;
    flex-direction: row;
    padding-top: 1.5em;
    padding-bottom: 1.5em;
    gap: 2em;
    width: 100%;
    justify-content: space-between;
    align-items: flex-start;
}

.skills-col {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.skills-list-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    justify-content: center;
    align-items: center;
}

.skill-tag {
    background: var(--surface-alt);
    color: var(--txt);
    font-weight: 600;
    border-radius: 2em;
    padding: 0.6em 1.5em 0.6em 0.9em;
    font-size: 1.05em;
    box-shadow: none;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    cursor: default;
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 0.6em;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInSkill 0.7s cubic-bezier(.4, 2, .3, 1) forwards;
}

.skill-tag img.skill-icon {
    width: 1.7em;
    height: 1.7em;
    margin-right: 0.3em;
    vertical-align: middle;
    filter: drop-shadow(0 0 2px var(--primary));
    flex-shrink: 0;
}

.skill-tag.fade-in-delay {
    animation-delay: calc(var(--i, 0) * 0.07s + 0.5s);
}

.skill-tag:hover {
    background: var(--primary);
    color: #fff;
    transform: scale(1.07);
    border-color: var(--primaryhover);
}

.skill-tag[data-skill] {
    cursor: pointer;
}

.skill-tag.skill-active {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primaryhover) !important;
    box-shadow: 0 0 16px 0 rgba(72, 166, 167, 0.35);
    transform: scale(1.08);
}

/* Project highlight/dim when skill is selected */
.project-card.project-dimmed {
    opacity: 0.25;
    filter: grayscale(0.6);
    transform: scale(0.97);
    pointer-events: none;
}

.project-card.project-highlighted {
    border-color: var(--primary) !important;
    box-shadow: 0 0 28px 0 rgba(72, 166, 167, 0.22), 0 8px 32px 0 rgba(35, 141, 228, 0.16) !important;
    transform: translateY(-6px);
}

@keyframes diplomaFadeIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.diploma-list {
    display: flex;
    flex-direction: column;
    gap: 1.7em;
    margin-top: 1.5em;
}

.diploma-item {
    display: flex;
    align-items: center;
    gap: 1.2em;
    background: var(--surface-diploma);
    border-radius: 1em;
    padding: 1.2em 1.7em;
    box-shadow: 0 2px 12px 0 var(--shadow-color);
    border: 1.5px solid var(--border-subtle);
    transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    animation: fadeInUp 1.2s cubic-bezier(.4, 2, .3, 1);
}

.diploma-item:hover {
    box-shadow: 0 6px 24px 0 rgba(72, 166, 167, 0.18);
    border: 1.5px solid var(--primary);
    background: var(--surface-popup);
}

.diploma-badge {
    font-size: 1em;
    font-weight: bold;
    border-radius: 1em;
    padding: 0.4em 1.2em;
    color: #fff;
    background: var(--primary);
    box-shadow: 0 1px 6px 0 rgba(35, 141, 228, 0.08);
    display: flex;
    align-items: center;
    gap: 0.4em;
    letter-spacing: 0.02em;
}

.diploma-badge.blue {
    background: var(--blue);
}

.diploma-badge.gold {
    background: var(--gold);
}

.diploma-badge.toeic {
    background: #22c55e;
    color: #fff;
    font-weight: bold;
    font-size: 1.05em;
    letter-spacing: 0.04em;
    box-shadow: 0 1px 8px 0 rgba(34, 197, 94, 0.13);
}

.diploma-title {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 0.2em;
}

.diploma-school {
    color: var(--txt-secondary);
    font-size: 1em;
}

.diploma-year {
    color: var(--txt-faint);
    font-size: 0.95em;
    margin-top: 0.2em;
}

/* ANIMATIONS UNIQUES */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes fadeInSkill {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes fadeInPopup {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInPopup {
    from {
        transform: translateY(60px) scale(0.98);
    }

    to {
        transform: none;
    }
}

@keyframes fadeInRole {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes fadeInProfileOverlay {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInProfileImg {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOutProfileOverlay {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.diploma-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 3000;
    align-items: center;
    justify-content: center;
    background: rgba(10, 18, 40, 0.65);
    /* autres styles si besoin */
}

.diploma-popup.open {
    display: flex;
    /* animation ou transition si besoin */
}

/* diploma-popup-content unique et optimisé */
.diploma-popup-content {
    background: var(--surface-popup);
    border-radius: 1.5em;
    box-shadow: 0 8px 24px 0 rgba(35, 141, 228, 0.13);
    padding: 2.5em 2em 2em 2em;
    min-width: 320px;
    width: 92vw;
    max-width: 1400px;
    animation: slideInPopup 0.5s cubic-bezier(.4, 2, .3, 1);
    position: relative;
    color: var(--txt);
    overflow-y: hidden;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
button,
input,
textarea,
select,
a,
p,
span,
div {
    font-family: 'Poppins', 'Poppins-Regular', Arial, sans-serif !important;
}

.diploma-btn-elegant {
    display: flex;
    align-items: center;
    gap: 0.7em;
    padding: 0.5em 1.3em;
    background: transparent;
    border: 1.5px solid rgba(129, 203, 211, 0.18);
    border-radius: 2em;
    color: #e0e0e0;
    font-size: 1.08em;
    font-weight: 500;
    box-shadow: 0 2px 8px 0 rgba(35, 141, 228, 0.06);
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.diploma-btn-elegant:hover {
    border: 1.5px solid var(--primary);
    color: var(--primary);
    background: rgba(72, 166, 167, 0.08);
}

.diploma-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 1.5em;
}

.diploma-btn-icon img {
    width: 1.5em;
    height: 1.5em;
    display: block;
}

.about-photo {
    flex: 0 0 320px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    height: 90%;
}

.profile-pic-large.no-bg {
    position: absolute;
    left: 3em;
    bottom: 0;
    width: auto;
    height: 70vh;
    max-height: 480px;
    min-height: 220px;
    object-fit: cover;
    box-shadow: none;
    background: none;
    border: none;
    align-self: flex-end;
}

.cursor-light {
    position: absolute;
    top: 0;
    left: 0;
    width: 400px;
    height: 400px;
    pointer-events: none;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(129, 203, 211, 0.10) 0%, rgba(72, 166, 167, 0.03) 40%, transparent 70%);
    z-index: 1;
    opacity: 0.7;
    display: none;
}

/* Navbar compacte et traits */
.navbar-vertical {
    position: fixed;
    top: 50%;
    left: 2em;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5em;
    background: var(--navbar-bg);
    border-radius: 2em;
    padding: 0.7em 0.5em;
    z-index: 2000;
    width: 56px;
    min-height: unset;
    height: auto;
    transition: background 0.4s ease;
}

.navbar-vertical .nav-link {
    width: 48px;
    height: 48px;
    margin: 0.2em 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: none;
    border: none;
    color: var(--navbar-txt);
    transition: background 0.2s ease, color 0.2s ease, filter 0.2s ease, transform 0.3s cubic-bezier(.4,0,.2,1);
    position: relative;
}

.navbar-vertical .nav-link img {
    width: 2.2em;
    height: 2.2em;
    transition: transform 0.3s cubic-bezier(.4,0,.2,1), filter 0.2s ease;
}

.navbar-vertical .nav-link:hover {
    color: #fff;
}

.navbar-vertical .nav-link:hover img {
    filter: brightness(0) saturate(100%) invert(55%) sepia(50%) saturate(600%) hue-rotate(140deg) brightness(1.3);
}

.navbar-vertical .nav-link.passed img {
    filter: brightness(0) saturate(100%) invert(55%) sepia(50%) saturate(600%) hue-rotate(140deg) brightness(1.1);
}

.navbar-vertical .nav-link.active {
    color: #fff;
}

.navbar-vertical .nav-link.active img {
    filter: brightness(0) saturate(100%) invert(55%) sepia(50%) saturate(600%) hue-rotate(140deg) brightness(1.3);
    transform: scale(1.35);
}

.navbar-vertical .nav-separator {
    width: 3px;
    height: 36px;
    background: #fff;
    border-radius: 2px;
    margin: 0.1em 0;
    transition: background 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    opacity: 0.7;
    box-shadow: none;
}

.navbar-vertical .nav-separator.active {
    background: var(--primary);
    opacity: 1;
    box-shadow: none;
}

.navbar-section-label {
    position: fixed;
    left: 90px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5em;
    font-weight: bold;
    color: var(--primary);
    background: var(--navbar-bg);
    border-radius: 1.2em;
    padding: 0.5em 1.2em;
    box-shadow: var(--navbar-shadow);
    z-index: 2001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, color 0.3s, background 0.4s ease;
    white-space: nowrap;
}

.navbar-section-label.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Palette plus sobre */
body,
.section,
.about-content,
.skills-section,
.projects-section {
    color: var(--txt-secondary);
    background: none;
}

.primary-bold {
    color: var(--primary-bold);
    font-weight: bold;
}

.about-container {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: center;
    gap: 3em;
    width: 100%;
    max-width: 1100px;
}

.about-photo-container {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    height: 100%;
    min-width: 220px;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 0.7em;
    min-width: 320px;
    max-width: 620px;
    justify-content: flex-start;
}

.about-content h1 {
    color: var(--primary);
    font-size: 2.5em;
    margin-bottom: 0.1em;
    margin-top: 0;
}

.about-content h2 {
    color: var(--blue);
    font-size: 1.1em;
    font-family: 'Poppins-Bold', Arial, sans-serif;
    margin-bottom: 0.7em;
    margin-top: 0;
}

.profile_phone {
    display: none;
    filter: drop-shadow(0 0 8px var(--primary));
    width: 30%;
    margin: 1em;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2em;
    width: 100%;
    padding: 1em 0;
}

.project-card {
    border-radius: 1.8em;
    overflow: hidden;
    box-shadow: 0 4px 24px 0 rgba(10, 18, 40, 0.25);
    border: 1px solid rgba(129, 203, 211, 0.06);
    transition: transform 0.4s cubic-bezier(.4, 2, .3, 1), box-shadow 0.4s cubic-bezier(.4, 2, .3, 1), border-color 0.4s cubic-bezier(.4, 2, .3, 1);
    position: relative;
    cursor: pointer;
    background: var(--surface-card);
}

/* Alternating card sizes for visual rhythm */
.projects-grid .project-card:nth-child(3n+1) {
    grid-column: span 1;
}

.projects-grid .project-card:first-child {
    border-radius: 2.5em 1em 2.5em 1em;
}

.projects-grid .project-card:nth-child(2) {
    border-radius: 1em 2.5em 1em 2.5em;
}

.projects-grid .project-card:nth-child(3) {
    border-radius: 1.5em;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 32px 0 rgba(35, 141, 228, 0.16);
    border-color: rgba(129, 203, 211, 0.3);
}

.project-banner {
    width: 100%;
    height: 320px;
    overflow: hidden;
    position: relative;
}

.project-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    will-change: transform;
}

.project-card:hover .project-banner img {
    transform: scale(1.3);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(24, 28, 36, 0.9) 0%, rgba(24, 28, 36, 0.5) 30%, rgba(24, 28, 36, 0.5) 70%, rgba(24, 28, 36, 0.9) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2em;
}

.project-overlay::after {
    content: "Infos";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: var(--primary);
    color: white;
    padding: 0.8em 1.5em;
    border-radius: 2em;
    font-weight: 600;
    font-size: 0.9em;
    opacity: 0;
    transition: transform 0.3s cubic-bezier(.4, 2, .3, 1), opacity 0.3s cubic-bezier(.4, 2, .3, 1);
    pointer-events: none;
    z-index: 10;
}

.project-card:hover .project-overlay::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.project-content {
    display: flex;
    flex-direction: column;
    gap: 0.8em;
}

.project-header {
    display: flex;
    flex-direction: column;
    gap: 0.4em;
}

.project-title {
    font-size: 1.6em;
    font-weight: bold;
    color: var(--primary);
    margin: 0;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.team-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    font-size: 0.72em;
    font-weight: 600;
    padding: 0.2em 0.7em;
    border-radius: 1em;
    width: fit-content;
    letter-spacing: 0.02em;
    text-shadow: none;
}

.team-badge-team {
    background: rgba(59, 130, 246, 0.25);
    color: #93bbfd;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.team-badge-solo {
    background: rgba(168, 85, 247, 0.25);
    color: #c4a5f7;
    border: 1px solid rgba(168, 85, 247, 0.4);
}

[data-theme="light"] .team-badge-team {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

[data-theme="light"] .team-badge-solo {
    background: rgba(168, 85, 247, 0.12);
    color: #7c3aed;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.project-description {
    color: var(--txt-secondary);
    font-size: 0.95em;
    line-height: 1.5;
    margin: 0;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
    margin-top: 0.3em;
}

.tech-tag {
    font-size: 0.75em;
    font-weight: 600;
    padding: 0.25em 0.6em;
    border-radius: 1em;
    border: 1px solid;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.tech-tag.front {
    background: rgba(100, 108, 255, 0.2);
    color: #818cf8;
    border-color: rgba(129, 140, 248, 0.4);
}

.tech-tag.back {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.4);
}

.tech-tag.payment {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
    border-color: rgba(192, 132, 252, 0.4);
}

.tech-tag.design {
    background: rgba(251, 146, 60, 0.2);
    color: #fb923c;
    border-color: rgba(251, 146, 60, 0.4);
}

.tech-tag.devops {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.4);
}

.tech-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.project-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.8em 1.5em;
    border-radius: 2em;
    font-weight: 600;
    font-size: 0.9em;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    align-self: flex-start;
    margin-top: 0.5em;
}

.project-btn:hover {
    background: var(--primaryhover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(72, 166, 167, 0.3);
}

/* Project Popup */
.project-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(.4, 0, .2, 1);
    background: var(--overlay-bg);
    border-radius: 32px !important;
}

.project-popup.open {
    opacity: 1;
    pointer-events: auto;
}

.project-popup.open .project-popup-content {
    animation: projectPopupOpen 0.45s cubic-bezier(.22, .61, .36, 1) forwards;
}

@keyframes projectPopupOpen {
    0% {
        opacity: 0;
        transform: scale(0.85) translateY(40px);
    }
    60% {
        opacity: 1;
        transform: scale(1.02) translateY(-4px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.project-popup-content {
    background: var(--surface-popup);
    box-shadow: 0 16px 64px 0 rgba(35, 141, 228, 0.25);
    max-width: 95vw;
    width: 1200px;
    max-height: 95vh;
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 32px 32px 0 32px !important;
}

.project-popup-header {
    position: relative;
    height: 250px;
    min-height: 80px;
    overflow: hidden;
    border-radius: 32px 32px 0 0;
    flex-shrink: 0;
    transition: height 0.3s cubic-bezier(.4, 0, .2, 1);
}

.project-popup-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(24, 28, 36, 0.8) 0%, rgba(24, 28, 36, 0.6) 50%, rgba(24, 28, 36, 0.4) 100%);
    display: flex;
    align-items: flex-end;
}

.project-popup-info {
    padding: 2em;
    color: white;
    width: 100%;
    transition: padding 0.3s cubic-bezier(.4, 0, .2, 1);
}

.project-popup-header.shrunk .project-popup-info {
    padding: 0.8em 2em;
}

.project-popup-title {
    font-size: 3em;
    font-weight: bold;
    color: var(--primary);
    margin: 0 0 0.2em 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    letter-spacing: -0.02em;
    transition: font-size 0.3s cubic-bezier(.4, 0, .2, 1);
}

.project-popup-team-badge {
    font-size: 0.85em;
    margin-left: auto;
}

.project-popup-header.shrunk .project-popup-title {
    font-size: 2em;
    margin: 0;
}

.project-popup-full-description {
    font-size: 1em;
    color: var(--txt-secondary);
    margin: 0 0 1.5em 0;
    opacity: 0.95;
    font-weight: 500;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.project-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    transition: color 0.2s;
}

.project-link:hover {
    color: var(--primaryhover);
}

/* Nouveaux styles pour la popup détaillée */
.project-date {
    display: flex;
    align-items: center;
    gap: 0.8em;
    background: rgba(72, 166, 167, 0.08);
    padding: 1em 1.5em;
    border-radius: 1em;
    border: 1px solid rgba(72, 166, 167, 0.2);
}

.date-label {
    color: var(--primary);
    font-weight: 600;
    font-size: 1.1em;
}

.date-value {
    color: var(--txt-secondary);
    font-size: 1.1em;
    font-weight: 500;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1em;
    margin-top: 1.5em;
}

.gallery-item {
    border-radius: 1em;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--border-subtle);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    background: var(--surface-popup) !important;
    aspect-ratio: 16/10;
}

.gallery-item:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
    border-color: rgba(129, 203, 211, 0.35);
    cursor: zoom-in;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    background: transparent !important;
    border: none !important;
    display: block;
    will-change: transform;
}

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

/* Video gallery items (YouTube iframes) */
.gallery-item-video {
    aspect-ratio: 16/9;
    min-height: 280px;
}

.gallery-item-video iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

@media (max-width: 768px) {
    .gallery-item-video {
        min-height: 200px;
    }

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

.project-link-container {
    display: flex;
    justify-content: center;
    margin-top: 2em;
    padding-top: 2em;
    border-top: 1px solid rgba(129, 203, 211, 0.2);
}

.project-link-btn {
    background: var(--primary);
    color: white;
    text-decoration: none;
    padding: 1.1em 2.2em;
    border-radius: 2em;
    font-weight: 600;
    font-size: 1.1em;
    transition: background 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1.5px solid rgba(129, 203, 211, 0.18);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 0.8em;
    letter-spacing: 0.02em;
    box-shadow: none;
}

.project-link-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-link-btn:hover::before {
    left: 100%;
}

.project-link-btn:hover {
    background: var(--primaryhover);
    transform: translateY(-4px) scale(1.03);
    border-color: var(--primaryhover);
}

.project-link-btn-muted {
    background: rgba(120, 130, 150, 0.5);
    border-color: rgba(120, 130, 150, 0.3);
    cursor: pointer;
}

.project-link-btn-muted:hover {
    background: rgba(120, 130, 150, 0.65);
    border-color: rgba(120, 130, 150, 0.4);
}

/* Couleurs pour les titres de catégories dans la popup */
.tech-category h5.front {
    color: #818cf8;
}

.tech-category h5.back {
    color: #22c55e;
}

.tech-category h5.payment {
    color: #c084fc;
}

.tech-category h5.design {
    color: #fb923c;
}

.tech-category h5.devops {
    color: #60a5fa;
}

.project-popup-body {
    padding: 2em;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.project-section h3 {
    color: var(--primary);
    font-size: 1.8em;
    margin-top: 1.5em;
    margin-bottom: .5em;
    font-weight: bold;
    letter-spacing: -0.01em;
    border-bottom: 2px solid rgba(72, 166, 167, 0.3);
    padding-bottom: 0.5em;
}

.project-section p {
    color: var(--txt-secondary);
    line-height: 1.7;
    font-size: 1.1em;
}

.tech-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2em;
}

.tech-category h5 {
    color: var(--primary);
    font-size: 1.2em;
    margin-bottom: 1em;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
}

.project-card {
    position: relative;
}

.see-more-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary);
    font-weight: 500;
    font-size: 1.1em;
    padding: 0.7em 2em;
    border-radius: 2em;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(.4, 2, .3, 1), transform 0.3s cubic-bezier(.4, 2, .3, 1);
    z-index: 10;
    box-shadow: 0 2px 12px 0 rgba(35, 141, 228, 0.10);
    letter-spacing: 0.01em;
}

.project-card:hover .see-more-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.07);
}

.about-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.about-header .diploma-btn-elegant {
    margin: 0 !important;
}

.name-typing {
    display: flex;
    align-items: center;
    font-family: 'Poppins-Bold', Arial, sans-serif;
    font-size: clamp(1.3em, 4vw, 2.5em);
    letter-spacing: 0.01em;
    position: relative;
    min-height: 1.5em;
}

.name-typing .prenom {
    color: var(--primary);
    margin-right: 0.2em;
}

.name-typing .nom,
.name-typing .pseudo {
    color: var(--primary-bold);
    font-weight: bold;
    white-space: pre;
}

.name-typing .slash {
    color: var(--primary);
    margin: 0 0.2em;
    font-weight: bold;
}

.mobile-name-typing {
    display: none;
}

@media (max-width: 1200px) {
    .name-typing {
        display: none !important;
    }

    .mobile-name-typing {
        display: flex;
        align-items: center;
        font-family: 'Poppins-Bold', Arial, sans-serif;
        font-size: 1.3em;
        letter-spacing: 0.01em;
        position: relative;
        min-height: 1.5em;
        justify-content: center;
        margin-bottom: 1em;
        color: var(--primary);
    }

    .mobile-name-typing .prenom {
        color: var(--primary);
        margin-right: 0.2em;
    }

    .mobile-name-typing .nom,
    .mobile-name-typing .pseudo {
        color: var(--primary-bold);
        font-weight: bold;
        white-space: pre;
    }

    .diploma-btn,
    .diploma-btn-elegant {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-left: auto;
        margin-right: auto;
    }

    #age {
        margin-top: .5em;
    }

    .profile_phone {
        display: block;
    }

    .about-container {
        flex-direction: column;
        gap: 0em;
        align-items: center;
    }

    .section {
        max-width: 100vw;
        padding: 0 0.2em;
    }

    section {
        padding-top: .5em;
        padding-bottom: 2em;
    }

    .profile-pic-large {
        display: none;
    }

    .skills-row {
        flex-direction: column;
    }

    .navbar-vertical {
        display: none;
    }

    .about-content h1 {
        font-size: 1.3em;
    }

    .diploma-item {
        flex-direction: column;
    }

    .diploma-popup-content>h2 {
        margin-top: 1.5em;
    }

    .project-popup {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        z-index: 3000;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        overflow-y: auto;
        background: rgba(10, 18, 40, 0.85);
        border-radius: 0 !important;
    }

    .project-popup.open {
        opacity: 1;
        pointer-events: auto;
    }

    .project-popup-content {
        width: 100vw !important;
        max-width: 100vw !important;
        min-width: 0;
        max-height: 100vh;
        border-radius: 0 !important;
        padding: 0 !important;
        box-shadow: none;
        display: flex;
        flex-direction: column;
        overflow-y: auto;
    }

    .project-popup-header {
        height: 180px !important;
        min-height: 60px;
        border-radius: 0 !important;
        position: sticky;
        top: 0;
        z-index: 2;
        transition: height 0.3s cubic-bezier(.4, 0, .2, 1);
    }

    .project-popup-header.shrunk {
        height: 60px !important;
    }

    .project-popup-header.shrunk .project-popup-title {
        font-size: 1.1em !important;
        margin: 0;
    }

    .project-popup-header.shrunk .project-popup-info {
        padding: 0.5em 1em !important;
    }

    .project-popup-banner {
        height: 100%;
        width: 100vw;
        object-fit: cover;
        border-radius: 0 !important;
    }

    .project-popup-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .project-popup-info {
        padding: 1.2em 1em 0.5em 1em !important;
        color: white;
        width: 100%;
        background: none;
        box-shadow: none;
    }

    .project-popup-title {
        font-size: 1.5em !important;
        margin-bottom: 0.5em;
        margin-top: 0.2em;
        text-align: left;
    }

    .project-popup-full-description {
        font-size: 1em;
        color: #e0e0e0;
        margin: 0 0 1.2em 0;
        opacity: 0.95;
        font-weight: 500;
        text-shadow: none;
        background: none;
        padding: 0;
        text-align: left;
    }

    .project-popup-body {
        padding: 1em 1em 2em 1em !important;
        max-height: unset;
        overflow-y: visible;
    }

    .close-popup {
        top: 1em;
        right: 1em;
        width: 40px;
        height: 40px;
    }

    .project-popup-content {
        padding-top: 0 !important;
    }

    #close-project {
        position: fixed !important;
        top: 1em;
        right: 1em;
        z-index: 10;
    }
}

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

    .project-card {
        margin: 0 0.5em;
    }

    .project-overlay {
        padding: 1.5em;
    }

    .project-popup-info {
        padding: .5em;
    }

    .project-title {
        font-size: 1.5em;
    }

    .project-popup-content {
        max-width: 95vw;
        max-height: 95vh;
    }

    .project-popup-header {
        height: 300px;
    }

    .project-popup-full-description {
        margin: 0;
    }

    .project-popup-title {
        font-size: 2em;
    }

    .tech-categories {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 1200px) and (min-width: 769px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5em;
    }
}

@media (max-width: 480px) {
    .project-banner {
        height: 260px;
    }

    .project-overlay {
        padding: 1.5em;
    }

    .project-title {
        font-size: 1.3em;
    }

    .project-description {
        font-size: 0.9em;
    }

    .tech-tag {
        font-size: 0.7em;
        padding: 0.2em 0.5em;
    }

    section,
    .section-card {
        padding-left: 0.5em;
        padding-right: 0.5em;
    }
}

.diploma-popup-header {
    position: sticky;
    top: 0;
    background: var(--surface-popup);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 1.5em 1.5em 0 0;
    min-height: 64px;
}

.diploma-popup-header h2 {
    flex: 1 1 auto;
    margin: 0;
    font-size: 2em;
    text-align: left;
}

.close-popup,
.close-popup-project {
    background: rgba(10, 18, 40, 0.6);
    border: 2px solid #ffffff;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    z-index: 20;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.close-popup-project {
    position: absolute;
    top: 1.5em;
    right: 1.5em;
    z-index: 10;
}

.close-popup:hover,
.close-popup-project:hover {
    transform: scale(1.1);
    border: 1px solid var(--primary);
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(72, 166, 167, 0.4);
}

.close-popup-icon {
    transform: scale(0.035);
    filter: brightness(0) invert(1);
}

.convert-popup-trigger {
    color: var(--primary);
    cursor: pointer;
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
    transition: color 0.2s, text-decoration-color 0.2s;
    font-weight: 600;
}

.convert-popup-trigger:hover {
    color: var(--primaryhover);
    text-decoration-color: var(--primaryhover);
}

.gallery-item-video-half {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .gallery-item-video-half {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1200px) {
    .diploma-popup-content {
        max-height: 100vh;
        overflow-y: auto;
        padding: 0 !important;
        width: 100%;
    }

    .diploma-popup-header {
        position: sticky;
        top: 0;
        background: var(--surface-popup);
        z-index: 10;
        border-radius: 1.5em 1.5em 0 0;
        box-shadow: 0 2px 12px 0 var(--shadow-color);
        padding: 0;
        min-height: 58px;
        width: 100%;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .diploma-popup-header h2 {
        font-size: 1.2em;
        margin: 0;
        padding-left: 1.1em;
        flex: 1 1 auto;
        text-align: left;
    }

    .close-popup {
        top: 0.7em;
        right: 1em;
        width: 38px;
        height: 38px;
        position: absolute;
    }

    .diploma-list {
        padding: 0;
        padding-top: 0.7em;
    }

    .diploma-item {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
        padding: 1.1em 1em 1.1em 1em;
        margin: 0 0.5em 1.2em 0.5em;
    }

    .diploma-badge {
        align-self: center;
        margin-bottom: 0.7em;
    }

    .diploma-title,
    .diploma-school,
    .diploma-year {
        text-align: left;
        align-items: flex-start;
    }

    .project-popup-content,
    .project-popup-header,
    .project-popup-banner,
    .project-popup-overlay {
        border-radius: 0 !important;
    }
}

.separator {
    width: 100%;
    max-width: 900px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.separator::before {
    content: '';
    display: block;
    width: 70%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--primary) 20%, var(--primaryhover) 50%, #818cf8 80%, transparent 100%);
    border-radius: 2px;
    box-shadow: 0 0 20px 0 rgba(72, 166, 167, 0.15);
    transition: transform 1.2s cubic-bezier(.4, 2, .3, 1), opacity 1.2s cubic-bezier(.4, 2, .3, 1);
    position: absolute;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    opacity: 0;
    will-change: transform, opacity;
}

.separator.visible::before {
    transform: translateX(-50%) scaleX(1);
    opacity: 0.6;
}

/* ===== Approach (inside skills) ===== */
.approach-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8em;
    width: 100%;
    margin-top: 2em;
    padding-top: 1.5em;
    border-top: 1px solid rgba(129, 203, 211, 0.08);
}

.approach-card {
    position: relative;
    padding: 2em 1.5em;
    border-radius: 1.5em;
    background: var(--surface-card);
    border: 1px solid var(--border-accent);
    transition: transform 0.4s cubic-bezier(.4, 2, .3, 1), border-color 0.4s cubic-bezier(.4, 2, .3, 1), box-shadow 0.4s cubic-bezier(.4, 2, .3, 1);
    overflow: hidden;
    text-align: center;
}

.approach-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primaryhover), #818cf8);
    opacity: 0;
    transition: opacity 0.4s;
}

.approach-card:hover {
    transform: translateY(-6px);
    border-color: rgba(129, 203, 211, 0.15);
    box-shadow: 0 12px 40px 0 rgba(72, 166, 167, 0.1);
}

.approach-card:hover::before {
    opacity: 1;
}

.approach-icon {
    font-size: 2.5em;
    margin-bottom: 0.5em;
    filter: grayscale(0.2);
}

.approach-card h3 {
    color: var(--primary);
    font-size: 1.15em;
    margin-bottom: 0.7em;
    font-weight: 600;
}

.approach-card p {
    color: var(--txt-muted);
    font-size: 0.92em;
    line-height: 1.6;
    margin: 0;
}

/* Alternate card accents */
.approach-card:nth-child(1)::before {
    background: linear-gradient(90deg, #d8df1a, #dc9c2e);
}

.approach-card:nth-child(2)::before {
    background: linear-gradient(90deg, #fb3c3c, #ff8989);
}

.approach-card:nth-child(3)::before {
    background: linear-gradient(90deg, #818cf8, #60a5fa);
}

.approach-card:nth-child(4)::before {
    background: linear-gradient(90deg, #84fc88, #439921);
}

@media (max-width: 1200px) {
    .approach-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .approach-grid {
        grid-template-columns: 1fr;
    }
}

/* Couleurs explicites pour les titres de catégories dans la section compétences */
.skills-col h3 {
    margin-bottom: 0.5em;
    font-size: 1.1em;
}

.skills-col h3.front {
    color: #818cf8;
}

.skills-col h3.back {
    color: #22c55e;
}

.skills-col h3.devops {
    color: #60a5fa;
}

.footer-icon {
    transition: transform 0.18s cubic-bezier(.4, 2, .3, 1), filter 0.18s cubic-bezier(.4, 2, .3, 1);
}

.footer-icon:hover {
    transform: scale(1.18) translateY(-2px);
    filter: drop-shadow(0 0 8px var(--primary)) brightness(0) saturate(100%) invert(54%) sepia(19%) saturate(1042%) hue-rotate(134deg) brightness(92%) contrast(92%);
}

footer a {
    text-decoration: none !important;
}

.diploma-item {
    box-shadow: 0 1px 4px 0 rgba(35, 141, 228, 0.07);
}

.diploma-item:hover {
    box-shadow: 0 3px 12px 0 rgba(72, 166, 167, 0.10);
}

.project-card {
    box-shadow: 0 4px 16px 0 rgba(35, 141, 228, 0.10);
}

.project-card:hover {
    box-shadow: 0 8px 32px 0 rgba(35, 141, 228, 0.16);
}

footer,
.site-footer {
    width: 100%;
    background: linear-gradient(90deg, rgba(24, 28, 36, 0.98) 60%, rgba(40, 44, 54, 0.98) 100%);
    color: var(--txt-secondary);
    text-align: center;
    padding: 1.1em 0 1em 0;
    font-size: 1em;
    box-shadow: 0 -2px 16px 0 rgba(35, 141, 228, 0.10);
    margin-top: 3em;
    border-top: 1.5px solid rgba(72, 166, 167, 0.18);
    transition: background 0.4s ease, color 0.4s ease;
}

.fade-in-role {
    opacity: 0;
    animation: fadeInRole 1.2s cubic-bezier(.4, 2, .3, 1) 0.7s forwards;
}

.profile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 18, 40, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    animation: fadeInProfileOverlay 0.4s cubic-bezier(.4, 2, .3, 1);
    cursor: zoom-out;
}

.profile-overlay img {
    max-width: 75%;
    max-height: 75%;
    border-radius: 50%;
    box-shadow: 0 8px 48px 0 rgba(35, 141, 228, 0.18);
    animation: fadeInProfileImg 0.5s cubic-bezier(.4, 2, .3, 1);
    background: var(--surface-popup);
    margin-bottom: 37vh;
}

.profile-overlay.fadeout {
    animation: fadeOutProfileOverlay 0.35s cubic-bezier(.4, 2, .3, 1) forwards;
}

.typewriter-cursor {
    display: inline-block;
    width: 1ch;
    background: none;
    color: var(--primary);
    animation: blink 0.8s steps(1) infinite;
    font-weight: bold;
}

/* ===== Lightbox / Carousel ===== */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 14, 24, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.lightbox-main-img {
    max-width: min(90vw, 1100px);
    max-height: 70vh;
    border-radius: 1em;
    box-shadow: 0 12px 64px rgba(0, 0, 0, 0.5);
    object-fit: contain;
    background: var(--surface-diploma);
    user-select: none;
    -webkit-user-drag: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(35, 43, 62, 0.85);
    border: 1.5px solid rgba(129, 203, 211, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
    z-index: 10;
    backdrop-filter: blur(6px);
}

.lightbox-nav:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: max(1.5vw, 12px);
}

.lightbox-next {
    right: max(1.5vw, 12px);
}

.lightbox-close-btn {
    position: absolute;
    top: max(1.5vw, 12px);
    right: max(1.5vw, 12px);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(35, 43, 62, 0.85);
    border: 1.5px solid rgba(129, 203, 211, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    z-index: 10;
}

.lightbox-close-btn:hover {
    background: #e53935;
    border-color: #e53935;
}

.lightbox-counter {
    position: absolute;
    top: max(1.5vw, 12px);
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95em;
    font-weight: 600;
    letter-spacing: 0.08em;
    z-index: 10;
    pointer-events: none;
}

.lightbox-thumbs {
    position: absolute;
    bottom: max(1.5vw, 12px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5em;
    padding: 0.5em 0.8em;
    background: rgba(35, 43, 62, 0.8);
    border-radius: 1em;
    backdrop-filter: blur(8px);
    max-width: 90vw;
    overflow-x: auto;
    z-index: 10;
    scrollbar-width: none;
}

.lightbox-thumbs::-webkit-scrollbar {
    display: none;
}

.lightbox-thumb {
    width: 88px;
    height: 58px;
    object-fit: cover;
    border-radius: 0.5em;
    cursor: pointer;
    opacity: 0.45;
    transition: opacity 0.2s, border-color 0.2s, transform 0.2s;
    border: 2px solid transparent;
    flex-shrink: 0;
}

.lightbox-thumb:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

.lightbox-thumb.active {
    opacity: 1;
    border-color: var(--primary);
}

/* ===== Easter egg popup ===== */
.footer-easter-egg {
    cursor: pointer;
    transition: color 0.3s, text-shadow 0.3s;
    position: relative;
}

.footer-easter-egg:hover {
    color: var(--primary);
    text-shadow: 0 0 12px rgba(72, 166, 167, 0.4);
}

.footer-easter-egg::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 1.5px;
    background: var(--primary);
    transition: width 0.3s, left 0.3s;
}

.footer-easter-egg:hover::after {
    width: 100%;
    left: 0;
}

.easter-egg-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(.4, 0, .2, 1);
    background: rgba(10, 18, 40, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.easter-egg-popup.open {
    opacity: 1;
    pointer-events: auto;
}

.easter-egg-popup-content {
    background: linear-gradient(145deg, var(--surface-popup) 0%, var(--surface-diploma) 100%);
    border: 1.5px solid rgba(72, 166, 167, 0.25);
    border-radius: 1.5em 0em 0em 1.5em;
    max-width: 620px;
    width: 90vw;
    max-height: 95vh;
    overflow-y: auto;
    padding: 2.5em 2.5em 2em;
    position: relative;
    box-shadow: 0 16px 64px rgba(35, 141, 228, 0.2), 0 0 0 1px rgba(72, 166, 167, 0.08);
    animation: slideInPopup 0.45s cubic-bezier(.4, 2, .3, 1);
}

.easter-egg-popup-content .close-popup {
    position: absolute;
    top: 1em;
    right: 1em;
}

.easter-egg-icon {
    font-size: 3em;
    text-align: center;
    margin-bottom: 0.3em;
    animation: eggBounce 0.6s cubic-bezier(.4, 2, .3, 1);
}

@keyframes eggBounce {
    0% {
        transform: scale(0) rotate(-20deg);
        opacity: 0;
    }

    50% {
        transform: scale(1.3) rotate(5deg);
        opacity: 1;
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.easter-egg-popup-content h3 {
    color: var(--primary);
    font-size: 1.6em;
    font-weight: 700;
    text-align: center;
    margin: 0 0 0.8em;
    letter-spacing: -0.01em;
}

.easter-egg-body {
    color: var(--txt-secondary);
    font-size: 1.05em;
    line-height: 1.7;
}

.easter-egg-body p {
    margin: 0.6em 0;
}

.easter-egg-body ul {
    list-style: none;
    padding: 0;
    margin: 1em 0;
}

.easter-egg-body ul li {
    padding: 0.4em 0;
    padding-left: 0.2em;
}

.easter-egg-body strong {
    color: var(--primary);
}

.easter-egg-signature {
    text-align: right;
    font-style: italic;
    color: var(--primary);
    opacity: 0.8;
    margin-top: 1em !important;
    font-size: 1.1em;
}

@media (max-width: 768px) {
    .easter-egg-popup-content {
        padding: 2em 1.5em 1.5em;
        max-width: 95vw;
        border-radius: 1.2em;
    }

    .easter-egg-popup-content h3 {
        font-size: 1.3em;
    }

    .easter-egg-icon {
        font-size: 2.5em;
    }
}

/* Lightbox mobile */
@media (max-width: 768px) {
    .lightbox-main-img {
        max-width: 95vw;
        max-height: 55vh;
        border-radius: 0.7em;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
    }

    .lightbox-prev {
        left: 6px;
    }

    .lightbox-next {
        right: 6px;
    }

    .lightbox-thumb {
        width: 68px;
        height: 45px;
    }

    .project-gallery {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.6em;
    }
}

/* ===== Theme Toggle Button ===== */
.theme-toggle-topright {
    position: fixed;
    top: 2em;
    right: 7.5em;
    z-index: 2001;
}

#theme-toggle {
    background: var(--navbar-bg);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5em;
    height: 3.5em;
    border-radius: 50%;
    box-shadow: 0 4px 12px 0 var(--shadow-color);
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    padding: 0;
    position: relative;
    overflow: hidden;
    animation: occasionalJump 8s infinite cubic-bezier(.4, 0, .2, 1);
}

#theme-toggle:hover {
    background: var(--primary);
    transform: translateY(-2px);
    animation-play-state: paused;
}

#theme-toggle .theme-icon {
    font-size: 1.6em;
    line-height: 1;
    transition: transform 0.4s cubic-bezier(.4, 2, .3, 1), opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#theme-toggle:hover .theme-icon {
    transform: rotate(30deg);
}

/* ===== Availability Badge ===== */
.availability-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.4em 1.1em 0.4em 0.8em;
    border-radius: 2em;
    background: rgba(30, 203, 92, 0.1);
    border: 1.5px solid rgba(30, 203, 92, 0.25);
    font-size: 0.88em;
    font-weight: 600;
    color: var(--green);
    letter-spacing: 0.01em;
    white-space: nowrap;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.availability-badge:hover {
    border-color: rgba(30, 203, 92, 0.5);
    background: rgba(30, 203, 92, 0.15);
}

.availability-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    display: inline-block;
    position: relative;
    flex-shrink: 0;
}

.availability-dot::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--green);
    opacity: 0.3;
    animation: availabilityPulse 2s cubic-bezier(.4, 0, .6, 1) infinite;
}

@keyframes availabilityPulse {

    0%,
    100% {
        transform: scale(0.8);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@media (max-width: 1200px) {
    .availability-badge {
        margin: 0;
        font-size: 0.82em;
    }

    .badge-cv-row {
        flex-direction: column;
        align-items: center;
        gap: 0.5em;
        margin: 0.3em auto 0.7em auto;
    }

    .cv-download-btn {
        font-size: 0.78em;
    }
}

/* ===== CV Download Button ===== */
.badge-cv-row {
    display: flex;
    align-items: center;
    gap: 0.8em;
    flex-wrap: wrap;
}

.cv-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    padding: 0.4em 1em 0.4em 0.8em;
    border-radius: 2em;
    background: rgba(72, 166, 167, 0.1);
    border: 1.5px solid rgba(72, 166, 167, 0.25);
    font-size: 0.85em;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
    font-family: inherit;
}

.cv-download-btn:hover {
    border-color: rgba(72, 166, 167, 0.5);
    background: rgba(72, 166, 167, 0.18);
    transform: translateY(-1px);
}

.cv-download-btn:active {
    transform: translateY(0);
}

.cv-download-btn svg {
    flex-shrink: 0;
}

/* ===== Light-mode specific overrides ===== */
[data-theme="light"] .navbar-vertical .nav-link img {
    filter: brightness(0) saturate(0%) invert(50%);
    opacity: 0.85;
}

[data-theme="light"] .navbar-vertical .nav-link:hover img {
    filter: brightness(0) saturate(100%) invert(45%) sepia(30%) saturate(500%) hue-rotate(140deg) brightness(1.1);
    opacity: 1;
}

[data-theme="light"] .navbar-vertical .nav-link.passed img {
    filter: brightness(0) saturate(100%) invert(45%) sepia(30%) saturate(500%) hue-rotate(140deg) brightness(0.85);
    opacity: 1;
}

[data-theme="light"] .navbar-vertical .nav-link.active img {
    filter: brightness(0) saturate(100%) invert(45%) sepia(30%) saturate(500%) hue-rotate(140deg) brightness(1.1);
    opacity: 1;
    transform: scale(1.35);
}

[data-theme="light"] .navbar-vertical .nav-separator {
    background: #888;
    opacity: 0.5;
}

[data-theme="light"] #lang-switch img {
    filter: drop-shadow(0 0 2px var(--primary)) brightness(0.8);
}

[data-theme="light"] .project-card {
    box-shadow: 0 2px 16px 0 rgba(35, 60, 120, 0.10);
    border-color: rgba(72, 166, 167, 0.18);
    background: rgba(225, 230, 242, 0.8);
}

[data-theme="light"] .project-card:hover {
    box-shadow: 0 6px 28px 0 rgba(35, 60, 120, 0.16);
}

[data-theme="light"] .project-title {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .project-description {
    color: #e0e0e0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .project-popup-overlay {
    background: linear-gradient(135deg, rgba(24, 28, 36, 0.8) 0%, rgba(24, 28, 36, 0.6) 50%, rgba(24, 28, 36, 0.4) 100%);
}

[data-theme="light"] .project-popup-full-description {
    text-shadow: none;
}

[data-theme="light"] .project-popup-title {
    text-shadow: none;
}

[data-theme="light"] .project-popup-info {
    color: #e0e0e0;
}

[data-theme="light"] .close-popup-icon {
    filter: brightness(0) invert(1);
}

[data-theme="light"] .cursor-light {
    background: radial-gradient(circle, rgba(72, 166, 167, 0.08) 0%, rgba(72, 166, 167, 0.02) 40%, transparent 70%);
}

[data-theme="light"] .diploma-btn-elegant {
    color: var(--txt-secondary);
    border-color: var(--border-subtle);
}

[data-theme="light"] .diploma-btn-icon img {
    filter: brightness(0.3);
}

[data-theme="light"] .about-contacts .contact-link .icon-inline,
[data-theme="light"] .footer-icon {
    filter: brightness(0.3);
}

[data-theme="light"] .about-contacts .contact-link:hover .icon-inline {
    filter: brightness(1);
}

[data-theme="light"] footer {
    background: linear-gradient(90deg, rgba(230, 235, 245, 0.98) 60%, rgba(220, 228, 242, 0.98) 100%) !important;
    color: var(--txt-secondary) !important;
    border-top: 1.5px solid rgba(72, 166, 167, 0.18);
}

[data-theme="light"] .diploma-popup {
    background: rgba(235, 239, 248, 0.75);
}

[data-theme="light"] .lightbox-overlay {
    background: rgba(237, 241, 248, 0.95);
}

[data-theme="light"] .easter-egg-popup {
    background: rgba(237, 241, 248, 0.92);
}

[data-theme="light"] .tech-tag.front {
    background: rgba(100, 108, 255, 0.15);
    color: #4f46e5;
    border-color: rgba(79, 70, 229, 0.35);
}

[data-theme="light"] .tech-tag.back {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
    border-color: rgba(22, 163, 74, 0.35);
}

[data-theme="light"] .tech-tag.payment {
    background: rgba(168, 85, 247, 0.15);
    color: #9333ea;
    border-color: rgba(147, 51, 234, 0.35);
}

[data-theme="light"] .tech-tag.design {
    background: rgba(251, 146, 60, 0.15);
    color: #ea580c;
    border-color: rgba(234, 88, 12, 0.35);
}

[data-theme="light"] .tech-tag.devops {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
    border-color: rgba(37, 99, 235, 0.35);
}

[data-theme="light"] .project-date {
    background: rgba(72, 166, 167, 0.05);
}

[data-theme="light"] .separator::before {
    box-shadow: 0 0 12px 0 rgba(72, 166, 167, 0.1);
}

[data-theme="light"] .project-popup-body {
    color: #e0e0e0;
}

@media (max-width: 1200px) {
    [data-theme="light"] .project-popup {
        background: rgba(24, 28, 36, 0.95) !important;
    }
}

[data-theme="light"] .profile-overlay {
    background: rgba(237, 241, 248, 0.92);
}

[data-theme="light"] .project-overlay::after {
    background: var(--primary);
    color: white;
}

/* --- Timeline UI --- */
.timeline-container {
    display: grid;
    grid-template-rows: max-content 2px max-content;
    grid-template-columns: repeat(7, minmax(130px, 1fr));
    gap: 0;
    padding: 2em 0;
    margin: 0;
    width: 100%;
    overflow-x: hidden;
    scrollbar-width: thin;
    position: relative;
    align-items: center;
}

@media (max-width: 1030px) {
    .timeline-container {
        display: flex;
        flex-direction: column-reverse;
        padding: 1em 1em;
        margin: 0;
        width: 100%;
        overflow-x: visible;
        gap: 1.2em;
        align-items: center;
    }

    .timeline-container::before {
        display: none;
    }

    .timeline-progress {
        display: none;
    }

    .timeline-item {
        grid-row: unset !important;
        grid-column: unset !important;
        align-self: stretch !important;
        padding: 0 !important;
        margin-bottom: 0;
        flex-direction: column;
    }

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

    /* Remove vertical connector lines on mobile */
    .timeline-item::after {
        display: none;
    }

    /* Hide dots on mobile */
    .timeline-dot {
        display: none !important;
    }

    .timeline-content {
        padding: 1.1em;
    }

    .timeline-content:hover {
        transform: none;
    }
}

.timeline-container::before {
    content: '';
    grid-row: 2;
    grid-column: 1 / 8;
    height: 2px;
    background: rgba(129, 203, 211, 0.2);
    align-self: center;
}

.timeline-progress {
    content: '';
    grid-row: 2;
    grid-column: 1 / 8;
    height: 2px;
    background: var(--hover-color, transparent);
    width: var(--hover-width, 0px);
    align-self: center;
    justify-self: start;
    z-index: 1;
    transition: width 0.4s cubic-bezier(.4, 2, .3, 1), background 0.4s ease;
    box-shadow: 0 0 10px var(--hover-color, transparent);
}

.timeline-item {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0 1.2em;
    /* Ensure text doesn't touch the column borders */
}

/* Vertical connector lines */
.timeline-item::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 2.2em;
    background: rgba(129, 203, 211, 0.4);
    z-index: 0;
}

.timeline-item:nth-child(odd)::after {
    bottom: 0;
}

.timeline-item:nth-child(even)::after {
    top: 0;
}

/* Explicit placement to ensure correct column progression */
.timeline-item:nth-child(2) {
    grid-row: 3;
    grid-column: 1 / 3;
    align-self: start;
    padding-top: 2.2em;
}

.timeline-item:nth-child(3) {
    grid-row: 1;
    grid-column: 2 / 4;
    align-self: end;
    padding-bottom: 2.2em;
}

.timeline-item:nth-child(4) {
    grid-row: 3;
    grid-column: 3 / 5;
    align-self: start;
    padding-top: 2.2em;
}

.timeline-item:nth-child(5) {
    grid-row: 1;
    grid-column: 4 / 6;
    align-self: end;
    padding-bottom: 2.2em;
}

.timeline-item:nth-child(6) {
    grid-row: 3;
    grid-column: 5 / 7;
    align-self: start;
    padding-top: 2.2em;
}

.timeline-item:nth-child(7) {
    grid-row: 1;
    grid-column: 6 / 8;
    align-self: end;
    padding-bottom: 2.2em;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    z-index: 2;
}

/* Dot placement relative to the items */
.timeline-item:nth-child(odd) .timeline-dot {
    bottom: -8px;
}

.timeline-item:nth-child(even) .timeline-dot {
    top: -8px;
}

/* Badge specific dot colors */
.timeline-dot.dot-purple {
    background: #c084fc;
    box-shadow: 0 0 0 4px var(--surface-popup), 0 0 8px #c084fc;
}

.timeline-dot.dot-gold {
    background: #fbbf24;
    box-shadow: 0 0 0 4px var(--surface-popup), 0 0 8px #fbbf24;
}

.timeline-dot.dot-green {
    background: #34d399;
    box-shadow: 0 0 0 4px var(--surface-popup), 0 0 8px #34d399;
}

.timeline-dot.dot-blue {
    background: #60a5fa;
    box-shadow: 0 0 0 4px var(--surface-popup), 0 0 8px #60a5fa;
}

.timeline-dot.dot-orange {
    background: #fb923c;
    box-shadow: 0 0 0 4px var(--surface-popup), 0 0 8px #fb923c;
}

.timeline-dot.dot-red {
    background: #e06b6b;
    box-shadow: 0 0 0 4px var(--surface-popup), 0 0 8px #e06b6b;
}

.timeline-dot.dot-gray {
    background: #9ca3af;
    box-shadow: 0 0 0 4px var(--surface-popup), 0 0 8px #9ca3af;
}

.timeline-content {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: 1em;
    padding: 1.5em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: left;
}

.timeline-content:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.timeline-badge {
    display: inline-block;
    padding: 0.3em 0.8em;
    border-radius: 1em;
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 0.8em;
}

.timeline-badge.purple {
    background: rgba(192, 132, 252, 0.15);
    color: #d8b4fe;
}

.timeline-badge.gold {
    background: rgba(251, 191, 36, 0.15);
    color: #fcd34d;
}

.timeline-badge.green {
    background: rgba(52, 211, 153, 0.15);
    color: #6ee7b7;
}

.timeline-badge.blue {
    background: rgba(96, 165, 250, 0.15);
    color: #93c5fd;
}

.timeline-badge.orange {
    background: rgba(251, 146, 60, 0.15);
    color: #fdba74;
}

.timeline-badge.red {
    background: rgba(224, 107, 107, 0.15);
    color: #f0a5a5;
}

.timeline-badge.gray {
    background: rgba(156, 163, 175, 0.15);
    color: #d1d5db;
}

.timeline-title {
    font-size: 1.15em;
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 0.3em;
}

.timeline-school {
    font-size: 0.95em;
    color: var(--txt);
    font-weight: 500;
    margin-bottom: 0.2em;
}

.timeline-year {
    font-size: 0.85em;
    color: var(--txt-muted);
    font-style: italic;
    margin-bottom: 0.8em;
}

.timeline-desc {
    font-size: 0.9em;
    line-height: 1.6;
    color: var(--txt-secondary);
    margin: 0;
}

[data-theme="light"] .timeline-dot.dot-purple {
    box-shadow: 0 0 0 4px rgba(237, 241, 248, 0.95);
}

[data-theme="light"] .timeline-dot.dot-gold {
    box-shadow: 0 0 0 4px rgba(237, 241, 248, 0.95);
}

[data-theme="light"] .timeline-dot.dot-green {
    box-shadow: 0 0 0 4px rgba(237, 241, 248, 0.95);
}

[data-theme="light"] .timeline-dot.dot-blue {
    box-shadow: 0 0 0 4px rgba(237, 241, 248, 0.95);
}

[data-theme="light"] .timeline-dot.dot-orange {
    box-shadow: 0 0 0 4px rgba(237, 241, 248, 0.95);
}

[data-theme="light"] .timeline-dot.dot-red {
    box-shadow: 0 0 0 4px rgba(237, 241, 248, 0.95);
}

[data-theme="light"] .timeline-dot.dot-gray {
    box-shadow: 0 0 0 4px rgba(237, 241, 248, 0.95);
}

[data-theme="light"] .timeline-badge.purple {
    color: #9333ea;
}

[data-theme="light"] .timeline-badge.gold {
    color: #d97706;
}

[data-theme="light"] .timeline-badge.green {
    color: #059669;
}

[data-theme="light"] .timeline-badge.blue {
    color: #2563eb;
}

[data-theme="light"] .timeline-badge.orange {
    color: #ea580c;
}

[data-theme="light"] .timeline-badge.red {
    color: #c0504d;
}

[data-theme="light"] .timeline-badge.gray {
    color: #4b5563;
}