@import url('https://fonts.googleapis.com/css2?family=Schibsted+Grotesk:wght@400;600;900&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
    --bg: #050505;
    --surface: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.08);
    --aqua: #00E5FF;
    --text: #ffffff;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --c1: #00E5FF; --c2: #0099FF; --c3: #00FFBB; --c4: #29762F;
    --c5: #80FF00; --c6: #FF0000; --c7: #FF8BFF; --c8: #FFA5A5;
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Schibsted Grotesk', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background & Overlays */
#canvas-bg {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -2;
    filter: blur(100px);
    pointer-events: none;
}

.overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    background: rgba(0, 0, 0, 0.25); 
}

/* Loader */
#loader {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 1s cubic-bezier(0.85, 0, 0.15, 1);
}

.loader-wrapper { width: 100%; text-align: center; }

.loader-title {
    font-size: clamp(2.5rem, 12vw, 10rem);
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255,255,255,0);
    position: relative;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: -0.05em;
    display: inline-block;
    animation: showOutline 0.6s ease-out forwards;
}

@keyframes showOutline {
    to { -webkit-text-stroke: 1px rgba(255,255,255,0.3); }
}

.loader-title::after {
    content: "NATHXNAZUUR";
    position: absolute;
    left: 0; top: 0;
    width: 0%;
    height: 100%;
    color: #fff;
    -webkit-text-stroke: 0px;
    overflow: hidden;
    background: linear-gradient(90deg, var(--c1), var(--c3), var(--c2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fillAndStretch 1.2s cubic-bezier(0.7, 0, 0.3, 1) 0.6s forwards;
}

@keyframes fillAndStretch {
    0% { width: 0%; transform: scaleX(1.1); filter: blur(10px); }
    100% { width: 100%; transform: scaleX(1); filter: blur(0px); }
}

.loaded #loader { transform: translateY(-100%); }

/* Animations global (Montée vers le haut) */
.animate-in {
    opacity: 0;
    transform: translateY(40px);
    filter: blur(10px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), 
                filter 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.loaded .animate-in {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* Hero Section */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    padding: 40px 20px;
    position: relative;
}

header { text-align: center; margin-bottom: 30px; }

.name {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    letter-spacing: -2px;
    background: linear-gradient(135deg, var(--text) 50%, var(--c3));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--c1);
    font-size: 0.9rem;
    font-weight: 600;
}
.location svg { width: 18px; height: 18px; fill: currentColor; }

/* Socials & Links */
.social-container {
    display: flex;
    gap: clamp(15px, 4vw, 25px);
    background: var(--surface);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border);
    padding: 0 30px;
    border-radius: 100px;
    margin-bottom: 25px;
    height: 64px;
    align-items: center;
    z-index: 10;
}

.social-container a img {
    width: 24px;
    height: 24px;
    opacity: 0.7;
    transition: var(--transition);
}

.social-container a:hover img {
    opacity: 1;
    transform: translateY(-4px) scale(1.1);
    filter: drop-shadow(0 0 10px var(--c1));
}

.links-section {
    display: flex;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
    justify-content: center;
}

.link-item {
    padding: 12px 24px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.link-item:hover {
    border-color: var(--c1);
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.08);
}

/* Grille de projets */
.content-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 100px;
    width: 100%;
}

.section-title {
    width: 100%;
    max-width: 1100px;
    padding: 0 20px;
    margin: 60px 0 30px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--c6);
    font-weight: 900;
}

.grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    width: 100%;
    max-width: 1100px;
    padding: 0 20px;
}

.card {
    display: block; 
    text-decoration: none; 
    height: 420px;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    cursor: none; 
    transition: var(--transition);
    flex: 1 1 500px;
    max-width: 538px;
}

.card-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover .card-img { transform: scale(1.08); }
.card:hover { border-color: var(--c6); box-shadow: 0 10px 40px rgba(0,0,0,0.6); }

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 5%, transparent 60%);
}

.card-content {
    position: absolute;
    bottom: 24px; left: 24px; right: 24px;
    z-index: 2;
}

.card h3 { font-size: 1.5rem; margin-bottom: 4px; color: var(--c3); }
.card p { color: rgba(255,255,255,0.6); font-size: 0.9rem; margin-bottom: 16px; }

/* Conteneur URL style badge mono - Mise à jour police */
.card-url {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 8px 12px;
    border-radius: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: -0.02em;
    color: var(--c1);
    display: inline-block;
    width: fit-content;
}

/* Scroll & Cursor */
#project-cursor {
    position: fixed;
    width: 120px;
    height: 80px;
    pointer-events: none;
    z-index: 1000;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.3s ease, transform 0.3s ease;
    border: 2px solid var(--c1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
}

.scroll-indicator svg {
    width: 24px;
    height: 24px;
    animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}

@media (max-width: 900px) {
    .grid { gap: 20px; }
    .card { flex: 1 1 100%; max-width: 100%; height: 350px; cursor: default; }
    .social-container { padding: 0 15px; height: 56px; gap: 15px; }
    #project-cursor { display: none; }
}