/* ===== BASE ===== */
:root {
    --bg: #0b1220;
    --surface: #111a2e;
    --card: rgba(255, 255, 255, 0.04);
    --text: #e5e7eb;
    --muted: rgba(229, 231, 235, 0.72);
    --border: rgba(255, 255, 255, 0.1);
    --accent: #2563eb;
    --shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    --radius: 16px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.section {
    padding: 72px 0;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== HEADINGS ===== */
.heading {
    text-align: center;
    margin-bottom: 28px;
}
.heading h2 {
    font-weight: 700;
    font-size: 1.7rem;
    margin: 10px 0 8px;
    letter-spacing: 0.03em;
}
.section-subtitle {
    margin: 0;
    color: var(--muted);
}

.divider {
    width: 90px;
    height: 2px;
    background: rgba(255, 255, 255, 0.25);
    margin: 0 auto 14px;
}
.divider.thin {
    width: 70px;
    opacity: 0.6;
}

/* ===== NAVBAR ===== */
.navbar {
    background: rgba(11, 18, 32, 0.75);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.navbar .navbar-brand {
    letter-spacing: 0.04em;
}
.nav-link {
    color: rgba(229, 231, 235, 0.85) !important;
    border-radius: 999px;
    padding: 0.5rem 0.9rem !important;
    margin: 0 0.15rem;
}
.nav-link.active,
.nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text) !important;
}

/* ===== HERO ===== */
.hero {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 32px;
    align-items: center;
    padding-top: 10px;
}

.profile-picture {
    text-align: center;
}
.profile-picture img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow);
}

.kicker {
    color: rgba(229, 231, 235, 0.7);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin: 0 0 0.35rem 0;
}

#about h1 {
    font-size: 2.4rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
}

.subtitle {
    margin: 0 0 1rem 0;
    color: rgba(229, 231, 235, 0.85);
    font-weight: 600;
}

.summary {
    color: var(--muted);
    max-width: 72ch;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.btn-cta {
    border-radius: 12px;
    padding: 0.75rem 1.05rem;
    font-weight: 700;
}

.btn-primary {
    background: var(--accent);
    border: none;
}
.btn-primary:hover {
    filter: brightness(1.06);
}

.btn-outline-light {
    border-color: rgba(229, 231, 235, 0.25);
    color: rgba(229, 231, 235, 0.92);
}
.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(229, 231, 235, 0.35);
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}
.pill {
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    color: rgba(229, 231, 235, 0.92);
    font-weight: 700;
    font-size: 0.95rem;
}

/* ===== CARDS / SKILLS ===== */
.card-soft {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
    padding: 18px 18px;
    height: 100%;
}

.card-title {
    font-size: 1.1rem;
    margin: 0 0 12px 0;
    color: rgba(229, 231, 235, 0.92);
    font-weight: 800;
}

.skill-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.badge-skill {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    border: 1px solid rgba(37, 99, 235, 0.28);
    color: rgba(229, 231, 235, 0.95);
    font-weight: 700;
    font-size: 0.95rem;
}

.badge-skill--dark {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

/* ===== EXPERIENCE (TIMELINE) ===== */
.timeline {
    padding: 18px 10px;
    position: relative;
    list-style: none;
    margin: 0;
}
.timeline:before {
    content: " ";
    top: 0;
    bottom: 0;
    position: absolute;
    width: 4px;
    background-color: rgba(255, 255, 255, 0.18);
    left: 50%;
    margin-left: -2px;
    border-radius: 999px;
}
.timeline > li {
    margin-bottom: 20px;
    position: relative;
}

.timeline li .timeline-badge {
    color: rgba(229, 231, 235, 0.95);
    width: 48px;
    line-height: 48px;
    font-size: 18px;
    text-align: center;
    position: absolute;
    top: 18px;
    left: 50%;
    margin-left: -24px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border: 1px solid var(--border);
}

.timeline-panel-container,
.timeline-panel-container-inverted {
    width: 50%;
}

.timeline-panel-container {
    float: left;
}
.timeline-panel-container-inverted {
    float: right;
}

.timeline-panel {
    width: 90%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 18px;
    position: relative;
    box-shadow: var(--shadow);
    background: var(--card);
}

.timeline-panel-container .timeline-panel {
    float: right;
    margin-right: 40px;
}

.timeline-panel-container-inverted .timeline-panel {
    float: left;
    margin-left: 40px;
}

/* speech arrow */
.timeline-panel:after {
    position: absolute;
    top: 26px;
    right: -14px;
    display: inline-block;
    border-top: 14px solid transparent;
    border-left: 14px solid rgba(255, 255, 255, 0.04);
    border-right: 0 solid rgba(255, 255, 255, 0.04);
    border-bottom: 14px solid transparent;
    content: " ";
}
.timeline-panel-container-inverted .timeline-panel:after {
    border-left-width: 0;
    border-right-width: 14px;
    left: -14px;
    right: auto;
    border-right-color: rgba(255, 255, 255, 0.04);
}

.timeline-heading h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
}
.timeline-heading h4 {
    margin: 0.35rem 0 0.5rem;
    color: rgba(229, 231, 235, 0.75);
    font-weight: 700;
}
.text-muted {
    color: rgba(229, 231, 235, 0.6) !important;
}

.bullets {
    margin: 0;
    padding-left: 1.1rem;
}
.bullets li {
    margin: 0.4rem 0;
    color: rgba(229, 231, 235, 0.9);
}
.stack-line {
    margin-top: 0.75rem;
    color: var(--muted);
}

/* clearfix timeline */
.timeline > li:before,
.timeline > li:after {
    content: " ";
    display: table;
}
.timeline > li:after {
    clear: both;
}

/* ===== EDUCATION ===== */
.education-block {
    text-align: center;
    padding: 24px;
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    height: 100%;
}
.education-block h5 {
    color: rgba(229, 231, 235, 0.65);
    font-size: 0.95rem;
    margin-bottom: 12px;
}
.education-block span {
    font-size: 2rem;
}
.education-block h3 {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 12px 0 6px;
}
.education-block h4 {
    font-size: 1rem;
    font-weight: 700;
    color: rgba(229, 231, 235, 0.78);
    margin-bottom: 12px;
}
.education-block p {
    color: rgba(229, 231, 235, 0.9);
    margin: 0;
}

/* ===== PORTFOLIO (YOUR CAROUSEL PRESERVED) ===== */
.portfolio-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    align-items: start;
}

.portfolio-detail {
    display: none;
}
.portfolio-detail.active {
    display: block;
}

.portfolio-box .numb {
    font-size: 5.2rem;
    -webkit-text-stroke: 0.07rem rgba(255, 255, 255, 0.35);
    color: transparent;
    line-height: 1;
    margin-bottom: 8px;
}

.portfolio-box h3 {
    font-size: 1.6rem;
    font-weight: 900;
    margin: 0.3rem 0 1rem;
}

.tech-badges {
    margin: 18px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.portfolio-box .github {
    margin-top: 18px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.portfolio-box .github a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    font-size: 1.6rem;
    color: rgba(229, 231, 235, 0.95);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    transition: 0.2s;
    text-decoration: none;
}

.portfolio-box .github a:hover {
    border-color: rgba(37, 99, 235, 0.35);
    transform: translateY(-2px);
}

.portfolio-box .github a span {
    position: absolute;
    top: -60%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    white-space: nowrap;
    padding: 0.35rem 0.55rem;
    border-radius: 10px;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.9);
    color: #0b1220;
    opacity: 0;
    scale: 0.95;
    transition: 0.15s;
}
.portfolio-box .github a:hover span {
    top: -72%;
    opacity: 1;
    scale: 1;
}

.portfolio-box .portfolio-carousel {
    width: 100%;
    height: 420px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.1);
}

.portfolio-carousel .img-slide {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    gap: 2rem;
    height: inherit;
    transition: 0.5s;
    padding: 16px;
}

.portfolio-carousel .img-item {
    height: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.portfolio-carousel .img-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.portfolio-box .navigation {
    text-align: right;
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.portfolio-box .navigation button {
    display: inline-flex;
    padding: 0.45rem 0.55rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    font-size: 2rem;
    color: rgba(229, 231, 235, 0.92);
    cursor: pointer;
    transition: 0.2s;
}
.portfolio-box .navigation button:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.35);
}
.portfolio-box .navigation button.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}
.navigation button {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(255,255,255,.06);
    backdrop-filter: blur(6px);
}
/* ===== FOOTER ===== */
footer {
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    padding: 24px 0;
}
.to-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(229, 231, 235, 0.9);
    text-decoration: none;
    margin-bottom: 12px;
}
.muted {
    color: var(--muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .summary {
        margin: 0 auto;
    }
    .cta-row,
    .badge-row {
        justify-content: center;
    }

    .timeline:before {
        left: 24px;
    }
    .timeline li .timeline-badge {
        left: 24px;
        margin-left: -24px;
    }
    .timeline-panel-container,
    .timeline-panel-container-inverted {
        width: 100%;
        float: none;
    }
    .timeline-panel-container .timeline-panel,
    .timeline-panel-container-inverted .timeline-panel {
        width: calc(100% - 80px);
        margin: 0 0 0 64px;
        float: none;
    }
    .timeline-panel:after,
    .timeline-panel-container-inverted .timeline-panel:after {
        display: none;
    }

    .portfolio-container {
        grid-template-columns: 1fr;
    }
}
/* ===== Certifications ===== */

.certification-card {
    text-align: left;
}

.cert-title {
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cert-status {
    font-weight: 700;
    margin-top: 8px;
}

.cert-status.success {
    color: #22c55e;
}

.cert-status.progress-status {
    color: #facc15;
}
/* ===== GRID IMAGE PROJECT ===== */

.project-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 24px;
    height: 100%;
}

.project-grid img {
    width: 100%;
    height: auto;
    box-shadow: 0 10px 25px rgba(0,0,0,.35);
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.1);
    transition: transform .3s ease;
}
.project-grid img.web {
    object-fit: cover;
}

.project-grid img.mobile {
    object-fit: contain;
    background: #0f172a; /* fond dark derrière */
}
.project-grid img:hover {
    transform: scale(1.03);
}

/* Carousel */
.portfolio-carousel .img-slide {
    display: flex;
    transition: transform .5s ease;
}

.portfolio-carousel .img-item {
    flex: 0 0 100%;
}
.project-actions {
    margin-top: 20px;
}

.project-actions .btn {
    margin-right: 10px;
    border-radius: 20px;
}