

/*
    Global Styles
*/


:root {
    --clr-accent: #ff3b30;
    --clr-accent-hover: #ff5c5c;
    --clr-text-light: #1d1d1f;
    --clr-background-light: #ffffff;
    --clr-card-light: #f5f5f7;
    --clr-border-light: #e3e3e3;
    --clr-shadow: rgba(0, 0, 0, 0.08);

    --clr-text: var(--clr-text-light);
    --clr-background: var(--clr-background-light);
    --clr-card: var(--clr-card-light);
    --clr-border: var(--clr-border-light);
}

.dark-theme {
    --clr-text: #f5f5f7;
    --clr-background: #1c1c1e;
    --clr-card: #2c2c2e;
    --clr-border: #4a4a4c;
    --clr-shadow: rgba(255, 255, 255, 0.08);
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    line-height: 1.6;
    color: var(--clr-text);
    background-color: var(--clr-background);
    transition: background-color 0.4s ease, color 0.4s ease;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    color: var(--clr-text);
    margin-bottom: 0.5em;
    font-weight: 600;
}

h2 { font-size: 2.8em; font-weight: 700; color: var(--clr-accent); }
h3 { font-size: 1.8em; }
h4 { font-size: 1.1em; }

a {
    color: var(--clr-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--clr-accent-hover);
}

.section {
    padding: 80px 0;
    border-bottom: 1px solid var(--clr-border);
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9em;
}

.primary-btn {
    background-color: var(--clr-accent);
    color: var(--clr-background-light);
}

.primary-btn:hover {
    background-color: var(--clr-accent-hover);
    transform: scale(1.02);
}

.small-btn {
    padding: 8px 18px;
    font-size: 0.85em;
    border-radius: 5px;
}


/*
    Header Styles
*/


header {
    background-color: var(--clr-background);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 0 var(--clr-border);
}

header .container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 20px;
    width: 100%;
}

header h1 {
    margin: 0;
    font-size: 1.5em;
    line-height: 0;
}

header h1 img {
    height: 35px;
    width: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--clr-border);
    transition: border-color 0.3s;
}



/*
    Navigation Styles
*/


nav {
    display: flex;
    justify-content: center;
    gap: 25px;
}

nav a {
    margin-left: 0;
    font-weight: 500;
    color: var(--clr-text);
    padding: 5px 0;
    position: relative;
}

nav a:hover {
    color: var(--clr-accent);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--clr-accent);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}


/*
    Theme Toggle Button Styles
*/


.theme-toggle {
    position: fixed;
    top: 10px;
    right: 20px;
    background: var(--clr-card);
    color: var(--clr-text);
    border: 1px solid var(--clr-border);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.3em;
    line-height: 1;
    z-index: 101;
    box-shadow: 0 4px 10px var(--clr-shadow);
}

.theme-toggle:hover {
    background: var(--clr-border);
    color: var(--clr-accent);
}


/*
    Hero Section Styles
*/


.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    text-align: left;
    padding-top: 50px;
}

.hero h2 {
    font-size: 3.8em;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero .tagline {
    font-size: 1.3em;
    color: var(--clr-text);
    margin-bottom: 40px;
    font-weight: 300;
}


/*
    About Section Styles
*/


#about {
    text-align: center;
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 60px;
    margin-top: 30px;
}

.about-content p {
    flex: 1 1 300px;
    max-width: 600px;
    font-size: 1.1em;
    line-height: 1.6;
    text-align: justify;
}

.profile-container {
    flex-shrink: 0;
    text-align: center;
}

.profile-img-large {
    width: 250px;
    height: 250px;
    border-radius: 15px;
    object-fit: cover;
    border: 3px solid var(--clr-accent);
    box-shadow: 0 8px 20px var(--clr-shadow);
}

.contact-actions {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.contact-actions a {
    color: var(--clr-text);
    background-color: var(--clr-card);
    border: 1px solid var(--clr-border);
    padding: 12px 15px;
    border-radius: 8px;
    transition: background-color 0.2s ease, transform 0.1s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.contact-actions a:hover {
    background-color: var(--clr-border);
    color: var(--clr-accent);
    transform: translateY(-2px);
}


/*
    Skills Section Styles
*/


#skills {
    text-align: center;
}


.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.skill-category {
    padding: 20px;
    background: var(--clr-card);
    border-radius: 10px;
    box-shadow: 0 4px 10px var(--clr-shadow);
    border: 1px solid var(--clr-border);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    background-color: var(--clr-border);
    box-shadow: 0 10px 20px var(--clr-shadow);
}

.skill-category h4 {
    border-bottom: 2px solid var(--clr-accent);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.skill-list {
    list-style: none;
    padding: 0;
}

.skill-list li {
    padding: 8px 0;
    font-size: 1em;
}

.skill-list li i {
    color: var(--clr-accent);
    margin-right: 10px;
    width: 20px;
    text-align: center;
}


/*
    Background Section Styles
 */


#background {
    text-align: center;
}

.tabs-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: #f0f0f0;
    cursor: pointer;
    border-radius: 5px;
    transition: 0.3s;
}

.tab-btn.active {
    background: #ff3b30;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.timeline {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    padding-left: 30px;
    border-left: 2px solid #ff3b30;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-dot {
    position: absolute;
    left: -39px;
    top: 5px;
    width: 16px;
    height: 16px;
    background: #ff3b30;
    border: 3px solid #ffffff;
    border-radius: 50%;
}

.timeline-date {
    font-size: 0.9em;
    color: #666;
    font-weight: bold;
}

.timeline-title {
    font-weight: bold;
    font-size: 1.1em;
    margin: 5px 0;
}


/*
    Projects Slider Styles
*/


#projects {
    text-align: center;
}


.projects-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-top: 40px;
}

.projects-slider {
    overflow: hidden;
    width: 480px;
    margin: 0 auto;
}

.projects-grid {
    display: flex;
    transition: transform 0.4s ease-in-out;
}

.project-card {
    min-width: 480px;
    max-width: 480px;
    flex-shrink: 0;

    background: var(--clr-card);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 15px var(--clr-shadow);
    border: 1px solid var(--clr-border);

    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-card h4 {
    padding: 18px 22px 8px;
    font-size: 1.2rem;
}

.project-card .description {
    padding: 0 22px 16px;
    line-height: 1.5;
}

.project-links {
    padding: 18px 22px;
    display: flex;
    justify-content: center; /* 👈 centrage horizontal */
    gap: 12px;
    border-top: 1px solid var(--clr-border);
}

.slider-btn {
    background: var(--clr-card);
    border: 1px solid var(--clr-border);
    color: var(--clr-text);
    font-size: 2rem;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.project-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.slider-btn:hover {
    background: var(--clr-border);
    transform: scale(1.1);
}

.slider-btn.prev {
    margin-right: 20px;
}

.slider-btn.next {
    margin-left: 20px;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--clr-border);
    opacity: 0.4;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s, background 0.2s;
}

.slider-dot.active {
    background: var(--clr-text);
    opacity: 1;
    transform: scale(1.3);
}


/*
    Contact Form Styles
*/


#contact {
    text-align: center;
}

.contact-form {
    max-width: 500px;
    margin: 30px auto 0;
    padding: 30px;
    background: var(--clr-card);
    border-radius: 12px;
    box-shadow: 0 4px 10px var(--clr-shadow);
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--clr-border);
    border-radius: 8px;
    background-color: var(--clr-background);
    color: var(--clr-text);
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--clr-accent);
}

.form-group textarea {
    resize: vertical;
}

.submit-btn {
    width: 100%;
    font-size: 1em;
}

.form-message {
    margin-top: 15px;
    text-align: center;
    font-weight: 600;
    display: none;
}


#h-captcha {
    margin-top: 20px;
    text-align: center;
}


/*
    Footer Styles
*/


footer {
    background-color: var(--clr-card);
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid var(--clr-border);
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer p {
    font-size: 0.9em;
}

.social-links a {
    font-size: 1.4em;
    margin-left: 15px;
}


/*
    Responsive Design
*/


@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    header .container {
        flex-direction: column;
        padding: 10px;
    }

    nav {
        gap: 15px;
        margin-top: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav a {
        font-size: 0.9em;
    }

    .hero {
        min-height: auto;
        padding: 60px 0;
        text-align: center;
    }

    .hero h2 {
        font-size: 2.2em;
    }

    .about-content {
        flex-direction: column;
    }

    .profile-img-large {
        width: 180px;
        height: 180px;
        margin-bottom: 10px;
    }

    .timeline {
        padding-left: 20px;
        margin-left: 10px;
    }

    .slider-btn {
        display: none;
    }

    .projects-slider-wrapper {
        justify-content: center;
    }

    footer .container {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 50px 0;
    }

    .hero {
        text-align: center;
        min-height: 60vh;
    }

    .hero h2 {
        font-size: 2.2em;
    }

    .hero .tagline {
        font-size: 1.1em;
    }

    .profile-img-large {
        width: 180px;
        height: 180px;
    }

    .about-content p {
        text-align: left;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 20px;
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
        top: 5px;
        right: 10px;
    }
}

@media (max-width: 400px) {
    h2 { font-size: 1.8em; }

    .contact-actions {
        flex-direction: column;
        width: 100%;
    }

    .contact-actions a {
        justify-content: center;
    }
}