﻿/* CSS professionnel avancé - Design raffiné et moderne */

:root {
    --bg-main: #0a0f1d;
    --bg-panel: rgba(15, 23, 42, 0.98);
    --bg-panel-soft: rgba(18, 28, 49, 0.95);
    --border: rgba(148, 163, 184, 0.2);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --accent: #38bdf8;
    --accent-soft: #60a5fa;
    --accent-dark: #0ea5e9;
    --shadow-light: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow: 0 20px 60px rgba(8, 15, 31, 0.4);
    --shadow-hover: 0 32px 80px rgba(56, 189, 248, 0.15);
    --radius: 28px;
    --transition-fast: all 0.2s ease;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-primary: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --font-heading: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background:
        radial-gradient(circle at 10% 15%, rgba(56, 189, 248, 0.22), transparent 18%),
        radial-gradient(circle at 92% 10%, rgba(168, 85, 247, 0.22), transparent 18%),
        radial-gradient(circle at 68% 78%, rgba(236, 72, 153, 0.16), transparent 24%),
        radial-gradient(circle at 42% 40%, rgba(56, 189, 248, 0.1), transparent 20%),
        linear-gradient(135deg, #050815 0%, #0a1120 26%, #111827 52%, #141f34 100%);
    background-size: 360% 360%, 330% 330%, 310% 310%, 280% 280%, 100% 100%;
    background-attachment: fixed;
    background-blend-mode: screen, screen, screen, screen, normal;
    color: var(--text-primary);
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
    font-feature-settings: 'kern' 1, 'liga' 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    animation: gradientShift 28s ease-in-out infinite, waveShift 18s ease-in-out infinite alternate, fadeInBody 1s ease-out;
}

@keyframes fadeInBody {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        radial-gradient(circle, rgba(56, 189, 248, 0.035) 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.08), transparent 18%);
    background-size: 70px 70px, 140px 140px, 120% 120%;
    background-position: 0 0, 45px 45px, center;
    opacity: 0.34;
    filter: blur(1px);
    pointer-events: none;
    z-index: -2;
    animation: float 22s ease-in-out infinite;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 18% 22%, rgba(56, 189, 248, 0.24), transparent 24%),
        radial-gradient(circle at 82% 30%, rgba(168, 85, 247, 0.2), transparent 22%),
        radial-gradient(circle at 50% 80%, rgba(236, 72, 153, 0.18), transparent 20%);
    opacity: 0.68;
    pointer-events: none;
    z-index: -3;
    filter: blur(80px);
    animation: glowPulse 16s ease-in-out infinite alternate;
}

@keyframes waveShift {
    0% {
        background-position: 0% 40%, 0% 30%, 0% 60%, 0% 20%, 0% 0%;
    }
    100% {
        background-position: 100% 40%, 100% 30%, 100% 60%, 100% 20%, 0% 0%;
    }
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.03);
    }
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%, 0% 50%, 0% 50%, 0% 0%;
    }
    50% {
        background-position: 100% 50%, 100% 50%, 100% 50%, 0% 0%;
    }
}

@keyframes float {
    0%, 100% {
        background-position: 0 0, 50px 50px;
    }
    50% {
        background-position: 100px 100px, 150px 150px;
    }
}

.floating-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: rgba(56, 189, 248, 0.5);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.7), 0 0 20px rgba(168, 85, 247, 0.2);
    animation: floatParticle 10s linear infinite, particleGlow 4s ease-in-out infinite;
}

@keyframes particleGlow {
    0%, 100% { opacity: 0.25; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.35); }
}

.particle:nth-child(1) {
    width: 4px;
    height: 4px;
    top: 10%;
    left: 20%;
    animation-duration: 12s;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    width: 6px;
    height: 6px;
    top: 20%;
    left: 80%;
    animation-duration: 15s;
    animation-delay: 1s;
}

.particle:nth-child(3) {
    width: 3px;
    height: 3px;
    top: 30%;
    left: 10%;
    animation-duration: 18s;
    animation-delay: 2s;
}

.particle:nth-child(4) {
    width: 5px;
    height: 5px;
    top: 40%;
    left: 60%;
    animation-duration: 20s;
    animation-delay: 3s;
}

.particle:nth-child(5) {
    width: 4px;
    height: 4px;
    top: 50%;
    left: 30%;
    animation-duration: 14s;
    animation-delay: 4s;
}

.particle:nth-child(6) {
    width: 7px;
    height: 7px;
    top: 60%;
    left: 90%;
    animation-duration: 16s;
    animation-delay: 5s;
}

.particle:nth-child(7) {
    width: 3px;
    height: 3px;
    top: 70%;
    left: 40%;
    animation-duration: 22s;
    animation-delay: 6s;
}

.particle:nth-child(8) {
    width: 5px;
    height: 5px;
    top: 80%;
    left: 70%;
    animation-duration: 19s;
    animation-delay: 7s;
}

.particle:nth-child(9) {
    width: 4px;
    height: 4px;
    top: 15%;
    left: 50%;
    animation-duration: 17s;
    animation-delay: 8s;
}

.particle:nth-child(10) {
    width: 6px;
    height: 6px;
    top: 25%;
    left: 15%;
    animation-duration: 21s;
    animation-delay: 9s;
}

.particle:nth-child(11) {
    width: 3px;
    height: 3px;
    top: 35%;
    left: 85%;
    animation-duration: 13s;
    animation-delay: 10s;
}

.particle:nth-child(12) {
    width: 5px;
    height: 5px;
    top: 45%;
    left: 25%;
    animation-duration: 24s;
    animation-delay: 11s;
}

.particle:nth-child(13) {
    width: 4px;
    height: 4px;
    top: 55%;
    left: 75%;
    animation-duration: 18s;
    animation-delay: 12s;
}

.particle:nth-child(14) {
    width: 7px;
    height: 7px;
    top: 65%;
    left: 5%;
    animation-duration: 20s;
    animation-delay: 13s;
}

.particle:nth-child(15) {
    width: 3px;
    height: 3px;
    top: 75%;
    left: 55%;
    animation-duration: 16s;
    animation-delay: 14s;
}

@keyframes floatParticle {
    0% {
        transform: translateY(0px) translateX(0px) rotate(0deg);
        opacity: 0.2;
    }
    25% {
        opacity: 0.6;
    }
    50% {
        transform: translateY(-20px) translateX(10px) rotate(180deg);
        opacity: 0.4;
    }
    75% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(0px) translateX(0px) rotate(360deg);
        opacity: 0.2;
    }
}

header {
    background: rgba(10, 14, 29, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.modern-menu ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    list-style: none;
    max-width: 1200px;
    margin: 0 auto;
}

.modern-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.9rem 1.5rem;
    border-radius: 50px;
    transition: var(--transition);
    position: relative;
    letter-spacing: 0.025em;
}

.modern-menu a::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(168, 85, 247, 0.1));
    opacity: 0;
    transition: var(--transition);
}

.modern-menu a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 12px;
    width: 0;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.95), rgba(168, 85, 247, 0.9));
    transition: var(--transition);
    transform: translateX(-50%);
}

.modern-menu a:hover::before,
.modern-menu .current::before {
    opacity: 1;
}

.modern-menu a:hover::after,
.modern-menu .current::after {
    width: 70%;
}

.modern-menu a:hover,
.modern-menu .current {
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.15);
}

#search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.2rem;
    padding: 5rem 2rem 4rem;
    max-width: 1000px;
    margin: 0 auto;
    animation: slideInFromTop 1.5s ease-out;
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#search-input {
    flex: 1;
    min-width: 280px;
    padding: 1.1rem 1.8rem;
    border-radius: 50px;
    border: 2px solid rgba(56, 189, 248, 0.3);
    background: rgba(15, 23, 42, 0.95);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
    box-shadow: var(--shadow-light), 0 0 10px rgba(56, 189, 248, 0.2);
    animation: neonBorder 3s ease-in-out infinite;
}

@keyframes neonBorder {
    0%, 100% { border-color: rgba(56, 189, 248, 0.3); box-shadow: var(--shadow-light), 0 0 10px rgba(56, 189, 248, 0.2); }
    50% { border-color: rgba(56, 189, 248, 0.8); box-shadow: var(--shadow-light), 0 0 20px rgba(56, 189, 248, 0.6), 0 0 30px rgba(56, 189, 248, 0.4); }
}

#search-input::placeholder {
    color: rgba(148, 163, 184, 0.75);
    font-style: italic;
}

#search-input:focus {
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1), var(--shadow);
    transform: scale(1.02);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1), var(--shadow);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(56, 189, 248, 0.2), var(--shadow);
    }
}

#search-button {
    padding: 1.1rem 2.2rem;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--accent), #818cf8, #a855f7);
    background-size: 200% 200%;
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 12px 35px rgba(56, 189, 248, 0.2);
    position: relative;
    overflow: hidden;
}

#search-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: var(--transition);
}

#search-button::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50px;
    box-shadow: 0 0 0 rgba(255, 255, 255, 0);
    opacity: 0;
    transition: var(--transition);
}

#search-button:hover::before {
    opacity: 1;
}

#search-button:hover::after {
    opacity: 1;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.2), 0 0 45px rgba(56, 189, 248, 0.35);
}

#search-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-hover);
    background-position: right center;
    animation: bounce 0.6s ease, gradientMove 1s ease infinite;
}

@keyframes gradientMove {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(-2px) scale(1.05);
    }
    40% {
        transform: translateY(-4px) scale(1.08);
    }
    60% {
        transform: translateY(-2px) scale(1.06);
    }
}

#search-button:active {
    transform: translateY(0);
}

#portfolio {
    padding: 6rem 2rem 4rem;
    max-width: 1300px;
    margin: 0 auto;
    animation: zoomIn 1.2s ease-out;
}

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

#portfolio h2 {
    text-align: center;
    font-family: var(--font-heading);
    font-size: clamp(2.6rem, 5vw, 3.8rem);
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 25%, #a855f7 50%, #38bdf8 75%, #ffffff 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 3rem;
    letter-spacing: -0.05em;
    line-height: 1.1;
    text-shadow: 
        0 0 5px rgba(56, 189, 248, 0.5),
        0 0 10px rgba(56, 189, 248, 0.5),
        0 0 15px rgba(56, 189, 248, 0.5),
        0 0 20px rgba(168, 85, 247, 0.5);
    animation: textGlow 3s ease-in-out infinite alternate, neonFlicker 2s infinite;
}

@keyframes neonFlicker {
    0%, 100% { text-shadow: 0 0 5px rgba(56, 189, 248, 0.5), 0 0 10px rgba(56, 189, 248, 0.5), 0 0 15px rgba(56, 189, 248, 0.5), 0 0 20px rgba(168, 85, 247, 0.5); }
    50% { text-shadow: 0 0 2px rgba(56, 189, 248, 0.3), 0 0 5px rgba(56, 189, 248, 0.3), 0 0 8px rgba(56, 189, 248, 0.3), 0 0 12px rgba(168, 85, 247, 0.3); }
}

@keyframes textGlow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

.categories {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin-bottom: 4rem;
    animation: fadeInUp 1s ease-out;
}

.categories .category {
    animation: slideInUp 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(50px);
}

.categories .category:nth-child(1) { animation-delay: 0.1s; }
.categories .category:nth-child(2) { animation-delay: 0.2s; }
.categories .category:nth-child(3) { animation-delay: 0.3s; }
.categories .category:nth-child(4) { animation-delay: 0.4s; }
.categories .category:nth-child(5) { animation-delay: 0.5s; }
.categories .category:nth-child(6) { animation-delay: 0.6s; }
.categories .category:nth-child(7) { animation-delay: 0.7s; }
.categories .category:nth-child(8) { animation-delay: 0.8s; }
.categories .category:nth-child(9) { animation-delay: 0.9s; }
.categories .category:nth-child(10) { animation-delay: 1.0s; }
.categories .category:nth-child(11) { animation-delay: 1.1s; }
.categories .category:nth-child(12) { animation-delay: 1.2s; }

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-link {
    text-decoration: none;
    display: block;
}

.category {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 280px;
    justify-content: center;
    position: relative;
    overflow: hidden;
    animation: floatCategory 6s ease-in-out infinite;
}

@keyframes floatCategory {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

.category::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(168, 85, 247, 0.06));
    opacity: 0;
    transition: var(--transition);
    border-radius: inherit;
}

.category::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 2px solid rgba(56, 189, 248, 0.15);
    opacity: 0;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.35), 0 0 30px rgba(168, 85, 247, 0.18);
    transition: var(--transition);
    pointer-events: none;
    z-index: -1;
}

.category:hover::before {
    opacity: 1;
    background-size: 200% 200%;
    animation: neonPulse 3s ease-in-out infinite;
}

.category:hover::after {
    opacity: 1;
    animation: neonSweep 1.6s ease-in-out infinite;
}

.category:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.45), 0 0 40px rgba(56, 189, 248, 0.3), inset 0 0 15px rgba(56, 189, 248, 0.12);
}

.category img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 1.5rem;
        filter: brightness(1.2) saturate(1.25) drop-shadow(0 8px 25px rgba(0, 0, 0, 0.2));
        transition: var(--transition);
    }

    .category:hover img {
        transform: scale(1.14);
        filter: brightness(1.35) saturate(1.3) drop-shadow(0 0 28px rgba(56, 189, 248, 0.6));
        transform: translateZ(0) rotate(0deg);
    }
    50% {
        box-shadow: 0 0 28px rgba(56, 189, 248, 0.85), 0 0 55px rgba(168, 85, 247, 0.35);
        transform: translateZ(0) rotate(1deg);
    }
}

@keyframes neonPulse {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.category-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.05em;
    margin: 0;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.portfolio-container {
    display: grid;
    gap: 2.5rem;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    padding: 2rem 2rem 5rem;
    max-width: 1300px;
    margin: 0 auto;
}

.portfolio {
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 30%),
                radial-gradient(circle at bottom right, rgba(168, 85, 247, 0.1), transparent 28%),
                linear-gradient(135deg, rgba(5, 11, 25, 0.95), rgba(10, 17, 38, 0.92));
    border: 1px solid rgba(56, 189, 248, 0.14);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    position: relative;
    animation: portfolioPulse 10s ease-in-out infinite alternate;
}

.portfolio::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.12), transparent 28%),
                radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.1), transparent 24%);
    opacity: 0.55;
    filter: blur(20px);
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.portfolio::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent 35%, rgba(255, 255, 255, 0.02));
    opacity: 0.26;
    pointer-events: none;
    z-index: 0;
}

.portfolio:hover::before {
    opacity: 0.75;
    transform: scale(1.01);
}

.portfolio:hover::after {
    opacity: 0.35;
    transform: scale(1.01);
}

.portfolio:hover {
    transform: translateY(-14px);
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 42px 100px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.portfolio-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: linear-gradient(135deg, #0b1226, #16223c);
    position: relative;
}

.portfolio-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 26%), radial-gradient(circle at bottom right, rgba(168, 85, 247, 0.14), transparent 30%);
    opacity: 1;
    pointer-events: none;
    transition: var(--transition);
}

.portfolio:hover .portfolio-image::before {
    opacity: 0.95;
    animation: pulseLayer 4s ease-in-out infinite;
}

.portfolio-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.14), transparent 28%),
                linear-gradient(90deg, transparent 15%, rgba(255, 255, 255, 0.18), transparent 85%);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.portfolio:hover .portfolio-image::after {
    opacity: 1;
    animation: shineSweep 4.8s ease-in-out infinite;
}

.portfolio:hover .portfolio-info {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 48px rgba(56, 189, 248, 0.08);
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1), filter 0.55s ease;
}

.portfolio:hover .portfolio-image img {
    transform: scale(1.12) rotate(1deg);
    filter: brightness(1.05) saturate(1.1);
}

.portfolio-info {
    padding: 2rem 2rem 2.5rem;
    position: relative;
    z-index: 2;
    transition: transform 0.4s ease, opacity 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
    background: rgba(5, 11, 25, 0.70);
    backdrop-filter: blur(18px);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.portfolio-info::before {
    content: '';
    position: absolute;
    top: 1rem;
    left: 2rem;
    width: 50px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.95), rgba(168, 85, 247, 0.9));
    opacity: 0.95;
}

.portfolio:hover .portfolio-info {
    transform: translateY(-6px);
}

.portfolio-info h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.9rem;
    line-height: 1.3;
    background: linear-gradient(135deg, #ffffff 0%, #dbeafe 35%, #a855f7 65%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

.portfolio-info p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1.8rem;
    line-height: 1.6;
}

.portfolio a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.8rem;
    border-radius: 50px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.95), rgba(168, 85, 247, 0.95));
    background-size: 260% 260%;
    background-position: 0% 50%;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    transition: var(--transition);
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.2);
    position: relative;
    overflow: hidden;
    animation: buttonFlow 4.5s ease-in-out infinite;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.portfolio a:hover {
    background-position: 100% 50%;
}

.portfolio a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: var(--transition);
}

.portfolio a:hover::before {
    opacity: 1;
}

.portfolio a:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 35px rgba(56, 189, 248, 0.35), 0 0 20px rgba(56, 189, 248, 0.25);
    animation: buttonGlow 1.8s ease-in-out infinite;
}

@keyframes portfolioPulse {
    0%, 100% {
        box-shadow: inset 0 0 60px rgba(56, 189, 248, 0.04);
        transform: translateY(0);
    }
    50% {
        box-shadow: inset 0 0 90px rgba(56, 189, 248, 0.08);
        transform: translateY(-1px);
    }
}

@keyframes borderFlow {
    0% {
        box-shadow: 0 0 30px rgba(56, 189, 248, 0.1), 0 0 60px rgba(168, 85, 247, 0.08);
    }
    50% {
        box-shadow: 0 0 40px rgba(56, 189, 248, 0.16), 0 0 80px rgba(168, 85, 247, 0.14);
    }
    100% {
        box-shadow: 0 0 30px rgba(56, 189, 248, 0.1), 0 0 60px rgba(168, 85, 247, 0.08);
    }
}

@keyframes pulseLayer {
    0%, 100% {
        transform: scale(1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.02);
        opacity: 1;
    }
}

@keyframes shineSweep {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes buttonGlow {
    0%, 100% {
        box-shadow: 0 12px 35px rgba(56, 189, 248, 0.35), 0 0 20px rgba(56, 189, 248, 0.25);
    }
    50% {
        box-shadow: 0 16px 45px rgba(56, 189, 248, 0.55), 0 0 30px rgba(56, 189, 248, 0.35);
    }
}

@keyframes buttonFlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

footer {
    background: rgba(10, 14, 27, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid var(--border);
    padding: 3rem 2rem 2rem;
    text-align: center;
    color: var(--text-secondary);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

footer p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

footer a:hover {
    color: var(--accent-soft);
    text-decoration: underline;
}

#cookie-banner {
    position: fixed;
    inset: auto 0 0;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    color: var(--text-primary);
    padding: 1.5rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
    display: none;
    z-index: 1000;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
}

#cookie-banner button {
    margin: 0 0.6rem;
    padding: 0.9rem 1.6rem;
    border-radius: 50px;
    border: none;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

#accept-cookies {
    background: linear-gradient(135deg, var(--accent), var(--accent-soft));
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.2);
}

#refuse-cookies {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

#accept-cookies:hover,
#refuse-cookies:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

@media (max-width: 1200px) {
    #portfolio {
        padding: 5rem 1.5rem 3rem;
    }

    .categories,
    .portfolio-container {
        gap: 1.8rem;
    }
}

@media (max-width: 768px) {
    header {
        padding: 1.2rem 1.5rem;
    }

    .modern-menu ul {
        gap: 1rem;
    }

    .modern-menu a {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }

    #search-container {
        flex-direction: column;
        align-items: stretch;
        padding: 4rem 1.5rem 3rem;
        gap: 1rem;
    }

    #search-input {
        min-width: auto;
    }

    #search-button {
        width: 100%;
        padding: 1rem 2rem;
    }

    .category {
        padding: 2rem 1.5rem;
        min-height: 240px;
    }

    .portfolio-container {
        grid-template-columns: 1fr;
        padding: 2rem 1.5rem 4rem;
        gap: 2rem;
    }

    .portfolio-info {
        padding: 1.8rem 1.8rem 2.2rem;
    }
}

@media (max-width: 480px) {
    #portfolio h2 {
        font-size: 2.5rem;
        margin-bottom: 2.5rem;
    }

    .category {
        padding: 1.8rem 1.2rem;
        min-height: 220px;
    }

    .category img {
        width: 70px;
        height: 70px;
    }

    .portfolio-image {
        height: 200px;
    }

    .portfolio-info {
        padding: 1.5rem 1.5rem 2rem;
    }

    .portfolio-info h3 {
        font-size: 1.3rem;
    }

    footer {
        padding: 2.5rem 1.5rem 2rem;
    }

    #cookie-banner {
        padding: 1.2rem 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-color-scheme: light) {
    :root {
        --bg-main: #f8fafc;
        --bg-panel: rgba(255, 255, 255, 0.95);
        --bg-panel-soft: rgba(248, 250, 252, 0.95);
        --border: rgba(148, 163, 184, 0.3);
        --text-primary: #0f172a;
        --text-secondary: #64748b;
        --shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
        --shadow-hover: 0 32px 80px rgba(56, 189, 248, 0.1);
    }

    body {
        background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    }

    body::before {
        opacity: 0.1;
    }
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
