@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ============ VARIABLES & RESET ============ */
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --accent: #06b6d4;
    --bg-dark: #0f172a;
    --bg-light: #f8fafc;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --card-bg: #ffffff;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============ HEADER ============ */
header {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1a2942 100%);
    color: #ffffff;
    padding: 80px 20px 60px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header h1 {
    font-size: 3em;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

header .subtitle {
    font-size: 1.1em;
    color: #cbd5e1;
    max-width: 700px;
    margin: 0 auto 40px;
    font-weight: 300;
    line-height: 1.8;
}

/* ============ NAVIGATION ============ */
nav {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

nav a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95em;
    position: relative;
    transition: var(--transition);
    padding: 4px 0;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

nav a:hover {
    color: #ffffff;
}

nav a:hover::after {
    width: 100%;
}

/* ============ MAIN CONTENT ============ */
main {
    max-width: 900px;
    margin: 60px auto;
    padding: 0 20px;
}

/* ============ SECTIONS & CARDS ============ */
section {
    margin-bottom: 60px;
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section h2 {
    font-size: 1.75em;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-dark);
    position: relative;
    padding-bottom: 12px;
}

section h2::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
}

section h3 {
    font-size: 1.1em;
    font-weight: 600;
    margin: 24px 0 12px 0;
    color: var(--text-dark);
}

section p {
    margin-bottom: 16px;
    color: var(--text-muted);
    line-height: 1.8;
}

/* ============ LISTES ============ */
ul {
    margin: 16px 0 24px 0;
    list-style: none;
}

li {
    margin-bottom: 12px;
    padding-left: 24px;
    position: relative;
    color: var(--text-muted);
    line-height: 1.8;
}

li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 600;
}

/* ============ SKILLS SECTION SPECIAL ============ */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.skill-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.skill-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.skill-card strong {
    color: var(--primary);
    display: block;
    margin-bottom: 4px;
}

/* ============ PROJECT CARDS ============ */
.project {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 32px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.project::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--accent));
}

.project:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08);
    transform: translateY(-2px);
}

.project h2 {
    margin-top: 0;
    padding-left: 12px;
}

.project h2::before {
    display: none;
}

.project h3 {
    color: var(--primary);
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 20px;
    margin-bottom: 8px;
}

.project ul {
    margin-left: 0;
}

.project li::before {
    content: '▪';
}

/* ============ CODE BLOCKS ============ */
code {
    background: var(--bg-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--primary);
    font-weight: 500;
}

/* ============ LIENS ============ */
a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

a:hover {
    color: var(--primary-dark);
    border-bottom: 1px solid var(--primary);
}

section a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
}

/* ============ FOOTER ============ */
footer {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-dark);
    color: #cbd5e1;
    font-size: 0.9em;
    margin-top: 80px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer a {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

footer a:hover {
    color: #ffffff;
}

footer p {
    margin: 0;
}

/* ============ CARROUSEL ============ */
.carousel {
    margin: 24px 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f0f0f0;
    aspect-ratio: 16 / 9;
    max-height: 400px;
}

.carousel-slides {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
}

.carousel-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.carousel-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
}

.carousel-nav {
    display: flex;
    gap: 8px;
}

.carousel-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-dark);
    transition: var(--transition);
    font-size: 0.9em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.carousel-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.carousel-btn:disabled:hover {
    border-color: var(--border);
    color: var(--text-dark);
    background: var(--card-bg);
}

.carousel-counter {
    font-size: 0.85em;
    color: var(--text-muted);
    font-weight: 500;
}

.carousel-dots {
    display: flex;
    gap: 6px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dot.active {
    background: var(--primary);
    width: 24px;
    border-radius: 4px;
}

.carousel-dot:hover {
    background: var(--primary-light);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    header {
        padding: 60px 20px 40px;
    }

    header h1 {
        font-size: 2.2em;
    }

    header .subtitle {
        font-size: 1em;
    }

    nav {
        gap: 24px;
    }

    section h2 {
        font-size: 1.5em;
    }

    .project {
        padding: 24px;
    }

    main {
        margin: 40px auto;
    }

    .carousel-container {
        aspect-ratio: 4 / 3;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8em;
    }

    nav {
        gap: 16px;
        font-size: 0.9em;
    }

    section h2 {
        font-size: 1.3em;
    }

    .project {
        padding: 16px;
        border-radius: 6px;
    }

    main {
        padding: 0 12px;
    }

    .carousel-container {
        aspect-ratio: 1 / 1;
    }

    .carousel-controls {
        flex-direction: column;
        gap: 12px;
    }
}
