:root {
    /* Dark Theme Palette */
    --primary-color: #6366f1; /* Indigo 500 */
    --primary-hover: #4f46e5; /* Indigo 600 */
    --secondary-color: #ec4899; /* Pink 500 */
    --accent-color: #8b5cf6; /* Violet 500 */
    
    --bg-color: #0f172a; /* Slate 900 */
    --bg-secondary: #1e293b; /* Slate 800 */
    --card-bg: #1e293b;
    --text-color: #f8fafc; /* Slate 50 */
    --text-muted: #94a3b8; /* Slate 400 */
    
    --nav-bg: rgba(15, 23, 42, 0.9);
    --footer-bg: #020617; /* Slate 950 */
    
    --border-color: #334155; /* Slate 700 */
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --glow: 0 0 15px rgba(99, 102, 241, 0.3);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: var(--primary-color);
    transition: var(--transition);
}

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

/* Dropdown menu (Projets) */
.nav-links .dropdown {
    position: relative;
}

.nav-links .dropdown-toggle {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-links .dropdown-toggle .chevron {
    font-size: 0.7rem;
    transition: transform 0.25s ease;
}

.nav-links .dropdown:hover .dropdown-toggle .chevron,
.nav-links .dropdown:focus-within .dropdown-toggle .chevron {
    transform: rotate(180deg);
}

.nav-links .dropdown-menu {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    min-width: 200px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 0.5rem;
    list-style: none;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 1100;
}

.nav-links .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
}

.nav-links .dropdown:hover .dropdown-menu,
.nav-links .dropdown:focus-within .dropdown-menu,
.nav-links .dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.nav-links .dropdown-menu li {
    list-style: none;
}

.nav-links .dropdown-menu a {
    display: block;
    padding: 0.6rem 0.9rem;
    border-radius: 0.5rem;
    color: var(--text-muted);
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-links .dropdown-menu a:hover,
.nav-links .dropdown-menu a.active {
    background: rgba(99, 102, 241, 0.12);
    color: var(--text-color);
}

.nav-links .dropdown-menu a::after {
    display: none;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 4rem;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.15), transparent 40%),
                radial-gradient(circle at bottom left, rgba(236, 72, 153, 0.15), transparent 40%);
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    box-shadow: var(--glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-color);
    transform: translateY(-2px);
}

/* Sections General */
section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--text-color);
}

/* Cards Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--glow);
}

.card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

/* Project Details Page Styles */
.project-hero {
    padding-top: 8rem;
    padding-bottom: 4rem;
    background: linear-gradient(to bottom, var(--bg-secondary), var(--bg-color));
    border-bottom: 1px solid var(--border-color);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--primary-color);
    transform: translateX(-5px);
}

.project-tags {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    font-size: 0.9rem;
}

.grid-details {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.main-image-container {
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.main-image-container img {
    width: 100%;
    height: auto;
    display: block;
}

.long-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.features-list {
    list-style: none;
    margin-top: 1rem;
}

.features-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.features-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
}

.info-card {
    position: sticky;
    top: 6rem;
}

.info-list {
    list-style: none;
    margin: 1.5rem 0;
}

.info-list li {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.info-list strong {
    color: var(--text-color);
    display: block;
    margin-bottom: 0.25rem;
}

.full-width {
    width: 100%;
    justify-content: center;
}

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

.gallery-item {
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.02);
    border-color: var(--accent-color);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Footer */
footer {
    background-color: var(--footer-bg);
    color: var(--text-muted);
    padding: 3rem 2rem;
    text-align: center;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.social-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Mobile menu to be implemented */
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .grid-details {
        grid-template-columns: 1fr;
    }
    
    .info-card {
        position: static;
    }
}

/* Modal (Lightbox) Styles */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    max-width: 80%;
    max-height: 80vh;
    border-radius: 0.5rem;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    object-fit: contain;
    cursor: default;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--primary-color);
}
