/* Custom Styles & Animations for Portfolio "Haluscinant" */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary: #4F6070;
    /* Accent Light */
    --secondary: #72808D;
    /* Accent Tint */
    --dark: #0f172a;
    /* Slate 900 */
    --light: #f8fafc;
    --glass: rgba(255, 255, 255, 0.05);
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--dark);
    color: var(--light);
    overflow-x: hidden;
    cursor: none;
    /* Custom cursor */
}

/* Halos lumineux subtils */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(120px);
    opacity: 0.12;
}

body::before {
    width: 600px;
    height: 600px;
    top: -100px;
    right: -100px;
    background: radial-gradient(circle, #4F6070 0%, transparent 70%);
}

body::after {
    width: 500px;
    height: 500px;
    bottom: 20%;
    left: -80px;
    background: radial-gradient(circle, #72808D 0%, transparent 70%);
}

.halo-mid {
    position: fixed;
    width: 450px;
    height: 450px;
    top: 50%;
    right: 15%;
    transform: translateY(-50%);
    border-radius: 50%;
    background: radial-gradient(circle, #4F6070 0%, transparent 70%);
    filter: blur(130px);
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

/* Halos par section — chaque section a sa propre lueur */
section {
    position: relative;
}

section::before {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(100px);
    opacity: 0;
    transition: opacity 0.8s ease;
}

/* Alternance des halos gauche/droite */
section:nth-child(odd)::before {
    width: 500px;
    height: 400px;
    top: 10%;
    left: -5%;
    background: radial-gradient(circle, rgba(79, 96, 112, 0.35) 0%, transparent 70%);
    opacity: 1;
}

section:nth-child(even)::before {
    width: 500px;
    height: 400px;
    top: 15%;
    right: -5%;
    left: auto;
    background: radial-gradient(circle, rgba(114, 128, 141, 0.3) 0%, transparent 70%);
    opacity: 1;
}

/* Deuxième halo inversé en bas de section */
section::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(120px);
}

section:nth-child(odd)::after {
    width: 400px;
    height: 350px;
    bottom: 5%;
    right: 0;
    background: radial-gradient(circle, rgba(114, 128, 141, 0.2) 0%, transparent 70%);
}

section:nth-child(even)::after {
    width: 400px;
    height: 350px;
    bottom: 5%;
    left: 0;
    background: radial-gradient(circle, rgba(79, 96, 112, 0.2) 0%, transparent 70%);
}

/* Le contenu reste au-dessus des halos */
section > * {
    position: relative;
    z-index: 1;
}

/* Restore default cursor on touch devices */
@media (pointer: coarse) {
    body {
        cursor: auto;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: white;
}

.cursor-outline {
    display: none;
}

/* Glassmorphism Utilities */
.glass {
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-nav {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Hero Section */
.hero-image-container {
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

.text-gradient {
    background: linear-gradient(to right, #8D98A2, #4F6070, #3D4B56);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.text-silver-gradient {
    background: linear-gradient(to right, #ffffff, #72808D);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.heading-aura {
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2)) drop-shadow(0 0 30px rgba(79, 96, 112, 0.1));
}

.section-title {
    font-size: 3rem;
    /* text-5xl */
    font-weight: 900;
    text-align: center;
    margin-bottom: 4rem;
    letter-spacing: -0.05em;
}

@media (max-width: 480px) {
    .section-title {
        font-size: 2rem;
    }
}

@media (min-width: 768px) {
    .section-title {
        font-size: 4.5rem;
        /* text-7xl */
    }
}

/* Performance Optimizations */
.optimize-gpu {
    will-change: transform, opacity;
    backface-visibility: hidden;
    perspective: 1000px;
}

.optimize-filter {
    will-change: filter;
}

/* Hero name - SVG flame animation */
.hero-name-svg {
    display: inline-block;
    max-width: 100%;
    height: auto;
    overflow: visible;
}

.hero-name-svg.flame-on {
    animation: heroUndulate 5s ease-in-out infinite;
    transform-origin: center center;
}

@keyframes heroUndulate {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    20% {
        transform: translateY(-3px) rotate(-0.3deg);
    }

    45% {
        transform: translateY(2px) rotate(0.2deg);
    }

    70% {
        transform: translateY(-2px) rotate(-0.15deg);
    }

    90% {
        transform: translateY(1px) rotate(0.1deg);
    }
}

/* 3D Card Hover Effect */
.project-card {
    transition: transform 0.1s;
    transform-style: preserve-3d;
}

/* Skill Tags */
.skill-tag {
    transition: all 0.3s ease;
}

.skill-tag.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 15px rgba(79, 96, 112, 0.6);
}

/* Contact Form */
.form-input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.form-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(79, 96, 112, 0.2);
}

/* Loader */
#loader {
    position: fixed;
    inset: 0;
    background: var(--dark);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}