:root {
    --primary: #f59e0b; /* Amber/Gold */
    --primary-glow: rgba(245, 158, 11, 0.4);
    --bg-dark: #0f172a;
    --bg-subtle: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition);
}

.nav.sticky {
    background: var(--glass);
    backdrop-filter: blur(12px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: 2px;
}

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

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: var(--glass);
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    font-size: 0.95rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, var(--primary-glow) 0%, transparent 40%),
                radial-gradient(circle at 80% 70%, rgba(30, 41, 59, 0.5) 0%, transparent 40%);
    z-index: -1;
}

.hero-inner {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.hero-content {
    max-width: 700px;
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-title span {
    color: var(--primary);
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.profile-container {
    position: relative;
    width: 400px;
    height: 400px;
}

.profile-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
    0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-dark);
    box-shadow: 0 10px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px var(--primary-glow);
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--bg-dark);
}

/* Sections */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Passion Cards */
.passion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 2rem;
}

.passion-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 3rem;
    border-radius: 24px;
    transition: var(--transition);
    text-align: center;
}

.passion-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    background: rgba(30, 41, 59, 0.9);
}

.passion-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 2rem;
}

/* Subdomain Links */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.link-card {
    position: relative;
    height: 250px;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1;
    transition: var(--transition);
}

.link-card:hover::before {
    background: rgba(245, 158, 11, 0.4);
}

.link-card img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.link-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}

.link-content h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
footer {
    padding: 4rem 0;
    border-top: 1px solid var(--glass-border);
    background: var(--bg-subtle);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--glass);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
    color: var(--bg-dark);
}



/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 2rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    border-radius: 24px;
    overflow: hidden;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.project-visual {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.5rem;
    color: rgba(255, 255, 255, 0.9);
    overflow: hidden;
}

.project-visual > * {
    transition: var(--transition);
}

.project-card:hover .project-visual > * {
    transform: scale(1.08);
}

.project-visual--codex {
    background: radial-gradient(circle at 30% 20%, rgba(139, 92, 246, 0.4), transparent 60%),
        linear-gradient(135deg, #1e1b4b, var(--bg-dark));
}

.project-visual--velvet {
    background: radial-gradient(circle at 70% 30%, rgba(236, 72, 153, 0.35), transparent 60%),
        linear-gradient(135deg, #4a044e, #1c0a1f);
}

.project-logo {
    height: 120px;
    width: auto;
}

.project-visual-icon {
    position: relative;
    display: inline-flex;
}

.project-visual-badge {
    position: absolute;
    right: -18px;
    bottom: -10px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 2px solid #8b5cf6;
    color: #8b5cf6;
}

.project-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 2rem;
}

.project-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

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

.project-stack {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.project-stack li {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.project-link i {
    transition: var(--transition);
}

.project-link:hover i {
    transform: translateX(5px);
}

.projects-cta {
    margin-top: 3rem;
    text-align: center;
    color: var(--text-muted);
}

.projects-cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

.project-visual--web {
    background: radial-gradient(circle at 70% 20%, rgba(59, 130, 246, 0.4), transparent 60%),
        linear-gradient(135deg, #0c1e4a, var(--bg-dark));
}

.project-visual--web .project-visual-badge {
    border-color: #3b82f6;
    color: #3b82f6;
}

/* Only Le-Codex remains in "Mon Univers": keep the card from spanning the whole row */
.links-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(350px, 100%), 560px));
    justify-content: center;
}

/* Responsive */
@media (max-width: 968px) {
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 120px 0 80px;
        text-align: center;
    }
    .hero-inner {
        flex-direction: column-reverse;
        gap: 2.5rem;
    }
    .hero-title { font-size: 3rem; }
    .hero-visual { justify-content: center; }
    .profile-container { width: 300px; height: 300px; }
}

@media (max-width: 768px) {
    .container { padding: 0 1.25rem; }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .nav-links {
        position: absolute;
        top: 100%;
        left: 1rem;
        right: 1rem;
        flex-direction: column;
        gap: 0;
        padding: 0.5rem;
        background: rgba(15, 23, 42, 0.97);
        border: 1px solid var(--glass-border);
        border-radius: 16px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: var(--transition);
    }
    .nav.open .nav-links {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .nav.open {
        background: var(--glass);
        backdrop-filter: blur(12px);
    }
    .nav-link {
        display: block;
        padding: 0.9rem 1rem;
        font-size: 1rem;
    }

    section { padding: 90px 0 70px; }
    .section-header { margin-bottom: 2.5rem; }
    .section-title { font-size: 2.25rem; }
    .section-subtitle { font-size: 1rem; }

    .hero-title { font-size: 2.5rem; }
    .hero-description { font-size: 1.05rem; }
    .profile-container { width: 220px; height: 220px; }

    .passion-card { padding: 2rem 1.5rem; }
    .passion-icon { margin-bottom: 1.25rem; }

    .project-visual { height: 170px; }
    .project-content { padding: 1.5rem; }

    .link-card { height: 200px; }
    .link-content h3 { font-size: 1.6rem; }

    .btn { padding: 0.85rem 1.5rem; }

    .footer-top {
        flex-direction: column;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
}
