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

body {
    font-family: 'DM Sans', sans-serif;
    background: #F5F2ED;
    color: #2D2D2D;
    overflow-x: hidden;
}

/*loader*/
#loader {
    position: fixed;
    inset: 0;
    background: #1A1A2E;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.loader-circle {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,255,255,0.15);
    border-top-color: #00d1d1;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

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

#loader.hide {
    opacity: 0;
    visibility: hidden;
}

/*social links bar*/
.social-sidebar {
    position: fixed;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.4rem;
    z-index: 998;
}

.social-sidebar::before,
.social-sidebar::after {
    content: '';
    display: block;
    width: 1px;
    height: 60px;
    background: #C0B8AC;
}

.social-sidebar a {
    color: #999;
    font-size: 1.1rem;
    text-decoration: none;
    transition: color 0.2s, transform 0.2s;
}

.social-sidebar a:hover {
    color: #00d1d1;
    transform: translateY(-3px);
}

/*nav bar*/
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 6%;
    background: rgba(245, 242, 237, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #E8E2D9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    transition: all 0.3s;
}

.navbar.scrolled {
    padding: 0.7rem 6%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1A1A2E;
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-link {
    display: flex;
    gap: 2rem;
    list-style: none;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: #777777;
    transition: color 0.2s;
    position: relative;
    cursor: pointer;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: #06B6D4;
    border-radius: 50%;
    opacity: 0;
    transition: 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: #1A1A2E;
}

.nav-link:hover::after,
.nav-link.active::after {
    opacity: 1;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #1A1A2E;
    transition: all 0.3s;
}

/*shared sections*/
.section-container {
    padding: 9rem 8%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-title {
    font-size: 2.4rem;
    font-weight: 800;
    color: #1A1A2E;
    margin-bottom: 3rem;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

.section-title .title-num {
    font-size: 0.9rem;
    color: #06B6D4;
    font-weight: 400;
    border: 1px solid #06B6D4;
    padding: 0.15rem 0.6rem;
    border-radius: 4px;
}

/*home section*/
#home {
    background: #1A1A2E;
    color: white;
    position: relative;
    overflow: hidden;
}

#home::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(26, 199, 230, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.home-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4rem;
    align-items: center;
}

.home-tag {
    display: inline-block;
    font-size: 0.8rem;
    color: #06B6D4;
    border: 1px solid rgba(18, 98, 173, 0.4);
    padding: 0.3rem 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.home-name {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.home-name span {
    color: #06B6D4;
}

.home-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.55);
    margin-bottom: 1rem;
    font-weight: 300;
}

.home-desc {
    color: rgba(255,255,255,0.4);
    line-height: 1.7;
    max-width: 480px;
    margin-bottom: 2.5rem;
    font-size: 0.95rem;
}

.home-buttons {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}


/* profile pic */
.profile-pic {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 40% 60% 65% 35% / 45% 40% 60% 55%;
    box-shadow: 0 25px 35px -12px rgba(0,0,0,0.2);
    transition: transform 0.3s;
    display: block;
}

.profile-pic:hover {
    transform: scale(1.02);
}

/* buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.6rem;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s;
    border: none;
    font-family: 'DM Sans', sans-serif;
}

.btn-primary {
    background: #06B6D4;
    color: white;
}

.btn-primary:hover {
    background: #06B6D4;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.7);
}

.btn-secondary:hover {
    border-color: rgba(255,255,255,0.5);
    color: white;
}

/* about */
#about {
    background: #FFFFFF;
}

.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text {
    color: #444444;
    line-height: 1.85;
    font-size: 1rem;
    margin-bottom: 1.2rem;
}

.about-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.5rem;
}

.tag {
    background: #1A1A2E;
    color: white;
    padding: 0.35rem 1rem;
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px solid #E8E2D9;
    transition: all 0.2s;
    cursor: default;
}

.tag:hover {
    background: #06B6D4;
    color: white;
    border-color: #06B6D4;
}

.about-box {
    background: #1A1A2E;
    border: 1px solid #E8E2D9;
    border-radius: 12px;
    padding: 1.8rem;
}

.info-row {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid #06B6D4;
}

.info-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.info-row i {
    color: #06B6D4;
    font-size: 0.9rem;
    margin-top: 3px;
}

.info-label {
    font-size: 0.75rem;
    color: #eeecea;
    display: block;
}

.info-value {
    font-size: 0.88rem;
    font-weight: 500;
    color:white;
}

/* skills */
#skills {
    background: #F5F2ED;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background: #FFFFFF;
    border: 1px solid #E8E2D9;
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s;
    opacity: 0;
    transform: translateY(20px);
}

.skill-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.skill-card:hover {
    border-color: #1A1A2E;
    box-shadow: 0 8px 25px rgba(93, 176, 232, 0.08);
}

.skill-card-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.skill-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #1A1A2E;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.skill-card-title {
    font-family: 'sans', sans-serif;
    font-size: 1rem;
    font-weight: 700;
}

.skill-bars {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-bar-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.skill-bar-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: #777777;
}

.skill-bar-track {
    height: 6px;
    background: #F5F2ED;
    border-radius: 3px;
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #06B6D4, #b8e7f0);
    border-radius: 3px;
    width: 0%;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.s-tag {
    background: #F5F2ED;
    border: 1px solid #E8E2D9;
    color: #2D2D2D;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: default;
}

.s-tag:hover {
    background: #06B6D4;
    color: white;
    border-color: #06B6D4;
}

/* formation*/
#formation {
    background: #FFFFFF;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #E8E2D9;
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.5s;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.45rem;
    top: 6px;
    width: 12px;
    height: 12px;
    background: #06B6D4;
    border-radius: 50%;
    border: 2px solid #FFFFFF;
    box-shadow: 0 0 0 3px rgba(56, 127, 168, 0.2);
}

.timeline-card {
    background: #F5F2ED;
    border: 1px solid #E8E2D9;
    border-radius: 10px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.timeline-card:hover {
    border-color: #06B6D4;
}

.timeline-card h3 {
    font-family: 'sans', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.timeline-date {
    font-size: 0.78rem;
    color: #444444;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.timeline-desc {
    font-size: 0.88rem;
    color: #777777;
    line-height: 1.6;
    display: none;
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid #E8E2D9;
}

.timeline-desc.open {
    display: block;
}

.timeline-toggle {
    font-size: 0.78rem;
    color: #06B6D4;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

/* projects */
#projects {
    background: #1A1A2E;
    color: white;
}

#projects .section-title {
    color: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.project-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 1.8rem;
    transition: all 0.3s;
    opacity: 0;
    transform: translateY(20px);
    cursor: pointer;
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    background: rgba(255,255,255,0.07);
    border-color: #06B6D4;
    transform: translateY(-4px);
}

.project-icon {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.project-card h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.project-tech {
    font-size: 0.75rem;
    color: #06B6D4;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.project-desc {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

.project-links {
    display: flex;
    gap: 0.6rem;
}

.project-link {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.project-link:hover {
    color: white;
    border-color: rgba(255,255,255,0.3);
}

.experience-box {
    background: rgba(232,93,93,0.08);
    border: 1px solid rgba(232,93,93,0.2);
    border-radius: 12px;
    padding: 2rem;
}

.experience-box h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.exp-meta {
    font-size: 0.82rem;
    color: #06B6D4;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.exp-desc {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.7;
}

/* contact */
#contact {
    background: #FFFFFF;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact-info p {
    color: #777777;
    line-height: 1.7;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.c-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #2D2D2D;
    text-decoration: none;
    font-size: 0.88rem;
    padding: 0.8rem 1rem;
    border: 1px solid #E8E2D9;
    border-radius: 8px;
    transition: all 0.2s;
    background: none;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.c-link:hover {
    border-color: #06B6D4;
    color: #06B6D4;
}

.c-link i {
    width: 20px;
    text-align: center;
    color: #06B6D4;
    transition: transform 0.2s;
}

/* Formulaire */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 500;
    color: #777777;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 1px solid #E8E2D9;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    color: #2D2D2D;
    background: #F5F2ED;
    transition: border-color 0.2s;
    resize: none;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #4A90D9;
}

.form-group input.error,
.form-group textarea.error {
    border-color: #06B6D4;
}

.form-error {
    font-size: 0.75rem;
    color: #06B6D4;
    display: none;
}

.form-error.show {
    display: block;
}

.btn-submit {
    background: #1A1A2E;
    color: white;
    padding: 0.85rem 2rem;
    border: none;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    align-self: flex-start;
}

.btn-submit:hover {
    background: #06B6D4;
    transform: translateY(-2px);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #1A1A2E;
    color: white;
    padding: 0.9rem 1.8rem;
    border-radius: 8px;
    font-size: 0.88rem;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.toast.success {
    background: #10B981;
}

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 42px;
    height: 42px;
    background: #06B6D4;
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
    font-size: 0.9rem;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* footer */
footer {
    background: #1A1A2E;
    color: rgba(255,255,255,0.3);
    text-align: center;
    padding: 1.5rem;
    font-size: 0.82rem;
}

/*RESPONSIVE */
@media (max-width: 900px) {
    .home-grid,
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .profile-pic {
        margin: 0 auto;
    }

    .home-name {
        font-size: 2.8rem;
    }

    .social-sidebar {
        display: none;
    }
}

@media (max-width: 640px) {
    .nav-menu {
        position: fixed;
        top: 65px;
        left: 0;
        width: 100%;
        background: #F5F2ED;
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid #E8E2D9;
        display: none;
    }

    .nav-menu.open {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .section-container {
        padding: 5rem 5%;
    }

    .home-name {
        font-size: 2.2rem;
    }

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