/* =========================================
   Enock Beauchant - Midnight Glass Theme
   ========================================= */

:root {
    --bg-color: #0f172a;
    /* Deep Slate */
    --surface-color: #1e293b;
    /* Lighter Cards */
    --accent-color: #38bdf8;
    /* Sky Blue */
    --text-primary: #f1f5f9;
    /* Off White */
    --text-muted: #94a3b8;
    /* Muted Grey */
    --glass-bg: rgba(15, 23, 42, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    --nav-height: 70px;
}

/* Reset & Basics */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

img {
    max-width: 100%;
    display: block;
}

/* =========================================
   Navigation (Glassmorphism)
   ========================================= */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-container {
    width: 90%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    /* Space between logo and menu */
    align-items: center;
}

.logo {
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.hamburger {
    display: none;
    /* Hidden on desktop */
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 5px;
    transition: all 0.3s ease;
}

/* Hamburger Animation active state */
.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-links a {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-muted);
    position: relative;
}

.nav-links a.active,
.nav-links a:hover {
    color: var(--accent-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.btn-primary {
    background-color: rgba(56, 189, 248, 0.1);
    color: var(--accent-color) !important;
    padding: 8px 16px;
    border: 1px solid var(--accent-color);
    border-radius: 20px;
    transition: all 0.3s;
}

.btn-primary:hover {
    background-color: var(--accent-color);
    color: var(--bg-color) !important;
}

/* =========================================
   Layout Containers
   ========================================= */
.main-wrapper {
    margin-top: var(--nav-height);
    padding-bottom: 50px;
}

.content-container {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* =========================================
   Hero Section
   ========================================= */
.hero-section {
    text-align: center;
    padding: 60px 20px 40px;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 70%);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.profile-pic {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 4px solid var(--accent-color);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
    object-fit: cover;
}

.hero-text h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(120deg, #f1f5f9, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    font-weight: 500;
}

.contact-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

/* =========================================
   Cards & Sections
   ========================================= */
.card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.3);
}

h2 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-size: 1.8rem;
    margin-bottom: 25px;
    border-left: 4px solid var(--accent-color);
    padding-left: 15px;
}

/* =========================================
   Skills Grid
   ========================================= */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.skill-category h3 {
    margin-bottom: 15px;
    color: var(--text-muted);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tags span {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-color);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 500;
}

/* =========================================
   Timeline (Experiences)
   ========================================= */
.timeline {
    position: relative;
    border-left: 2px solid var(--border-color);
    margin-left: 10px;
    padding-left: 30px;
}

.timeline-item {
    margin-bottom: 30px;
    position: relative;
}

.timeline-dot {
    position: absolute;
    left: -37px;
    top: 5px;
    width: 14px;
    height: 14px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-color);
}

.timeline-content h3 {
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.company {
    color: var(--accent-color);
    font-weight: 600;
    display: block;
}

.date {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    display: block;
    margin-bottom: 10px;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* =========================================
   Lists & Grids
   ========================================= */
.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.list-modern {
    list-style: none;
}

.list-modern li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
}

.list-modern li:last-child {
    border-bottom: none;
}

.list-modern strong {
    color: var(--text-primary);
}

.ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* =========================================
   Gallery (Certificates Page)
   ========================================= */
.page-header {
    text-align: center;
    padding: 40px 20px;
}

.page-header h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
}

.page-header p {
    color: var(--text-muted);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.gallery-item {
    padding: 0;
    overflow: hidden;
    text-align: center;
}

.img-wrapper {
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* ou cover selon préférence */
    transition: transform 0.3s ease;
}

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

.gallery-item h3 {
    padding: 15px;
    font-size: 1rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 500;
}

/* =========================================
   Footer
   ========================================= */
footer {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}

/* =========================================
   Mobile Responsiveness
   ========================================= */
@media (max-width: 768px) {

    html,
    body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }

    .glass-nav {
        height: 60px;
        /* Fixed height for mobile nav */
        padding: 0;
        width: 100%;
    }

    .nav-container {
        width: 95%;
        /* Slightly wider on mobile to avoid padding issues */
    }

    .logo {
        font-size: 1.1rem;
        /* Smaller font to fit full name */
        white-space: nowrap;
    }

    .hamburger {
        display: flex;
        /* Show hamburger */
    }

    .nav-links {
        position: fixed;
        /* Fixed to prevent layout shift */
        top: 60px;
        /* Below nav height */
        right: 0;
        height: calc(100vh - 60px);
        background: var(--bg-color);
        flex-direction: column;
        align-items: center;
        width: 100%;
        transform: translateX(100%);
        /* Hidden by default */
        transition: transform 0.3s ease-in-out;
        padding-top: 50px;
        border-top: 1px solid var(--border-color);
        z-index: 999;
    }

    .nav-links.active {
        transform: translateX(0%);
        /* Slide in */
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        padding: 15px 0;
        opacity: 0;
        /* Staggered animation setup */
    }

    .nav-links.active li {
        animation: fadeNav 0.5s ease forwards 0.3s;
    }

    .hero-section {
        margin-top: 20px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .grid-2-col {
        grid-template-columns: 1fr;
    }
}

@keyframes fadeNav {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   Lightbox Modals
   ========================================= */
.lightbox {
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    /* Show when active */
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    animation: zoomIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    background: none;
    border: none;
}

.lightbox-close:hover {
    color: var(--accent-color);
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

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