/* Style Terminal Linux */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600&display=swap');

* {
    font-family: 'Fira Code', 'Courier New', monospace;
}

/* Reset global pour éviter les marges par défaut du navigateur qui peuvent créer un décalage */
html, body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    position: relative;
    overflow-x: hidden;
    background: linear-gradient(135deg, #0a0e14 0%, #050d1a 50%, #102b3f 100%);
    background-attachment: fixed;
}

/* Particules animées en arrière-plan */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}

/* Canvas pour les éclairs */
#lightning-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Effet de scan line terminal subtil */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.1),
            rgba(0, 0, 0, 0.1) 1px,
            transparent 1px,
            transparent 2px
    );
    pointer-events: none;
}

/* Effet prompt terminal */
.terminal-prompt::before {
    content: '$ ';
    color: #a06cd5;
    font-weight: bold;
}

/* Effet clignotant pour curseur */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.cursor::after {
    content: '▌';
    animation: blink 1s infinite;
    color: #a06cd5;
}

/* Scrollbar personnalisée - Style Terminal */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #050d1a;
    border-left: 1px solid rgba(160, 108, 213, 0.2);
}

::-webkit-scrollbar-thumb {
    background: #6247aa;
    border: 2px solid #050d1a;
}

::-webkit-scrollbar-thumb:hover {
    background: #a06cd5;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #6247aa #050d1a;
}

/* Style des bordures terminal */
.terminal-border {
    border: 1px solid rgba(160, 108, 213, 0.3);
    position: relative;
}

.terminal-border::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(90deg,
    transparent 0%,
    rgba(160, 108, 213, 0.1) 50%,
    transparent 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.terminal-border:hover::before {
    opacity: 1;
}

/* Animation de typing */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

/* Effet de glow subtil sur les éléments interactifs */
.terminal-glow {
    transition: all 0.3s ease;
    position: relative;
}

.terminal-glow:hover {
    text-shadow: 0 0 10px rgba(160, 108, 213, 0.5);
    box-shadow: 0 0 20px rgba(160, 108, 213, 0.3),
    0 0 40px rgba(160, 108, 213, 0.1);
    transform: translateY(-2px);
}

/* Animation de pulse pour les éléments importants */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(160, 108, 213, 0.2);
    }
    50% {
        box-shadow: 0 0 20px rgba(160, 108, 213, 0.4),
        0 0 30px rgba(160, 108, 213, 0.2);
    }
}

.pulse-animate {
    animation: pulse-glow 3s ease-in-out infinite;
}

/* Animation de float */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.float-animate {
    animation: float 3s ease-in-out infinite;
}

/* Animation de slide-in */
@keyframes slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
}

.animate-on-scroll.animated {
    animation: fade-in-up 0.8s ease-out forwards;
}

/* Effet de bordure animée */
@keyframes border-pulse {
    0%, 100% {
        border-color: rgba(160, 108, 213, 0.3);
    }
    50% {
        border-color: rgba(160, 108, 213, 0.8);
    }
}

.border-animate {
    animation: border-pulse 2s ease-in-out infinite;
}

/* Effet terminal header */
.terminal-header {
    border-bottom: 1px solid rgba(160, 108, 213, 0.3);
    background: rgba(10, 14, 20, 0.95);
    backdrop-filter: blur(10px);
}

/* Ligne de séparation style terminal */
.terminal-separator {
    border-top: 1px dashed rgba(160, 108, 213, 0.2);
    margin: 0.5rem 0;
}

/* Badge terminal */
.terminal-badge {
    display: inline-block;
    padding: 0.2rem 0.4rem;
    border: 1px solid rgba(160, 108, 213, 0.4);
    font-size: 0.75rem;
    transition: all 0.2s;
}

.terminal-badge:hover {
    border-color: rgba(160, 108, 213, 0.8);
    background: rgba(160, 108, 213, 0.1);
}

/* Info box terminal */
.terminal-info-box {
    border-left: 3px solid #a06cd5;
    padding-left: 0.75rem;
    margin: 0.75rem 0;
}

/* Command prompt style */
.terminal-command {
    color: #a06cd5;
    font-weight: 600;
}

.terminal-output {
    color: #e2cfea;
    opacity: 0.8;
}

/* Réduction des espacements globaux */
.container {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

section {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

.py-5 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

.my-5 {
    margin-top: 2rem !important;
    margin-bottom: 2rem !important;
}

.py-4 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

.my-4 {
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

.mb-4 {
    margin-bottom: 1rem !important;
}

.mb-3 {
    margin-bottom: 0.75rem !important;
}

.card {
    margin-bottom: 1rem !important;
}

.card-body {
    padding: 1rem !important;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.75rem !important;
}

p {
    margin-bottom: 0.75rem !important;
}

ul, ol {
    margin-bottom: 0.75rem !important;
}

/* Effet 3D sur les cartes */
.card-3d {
    transition: all 0.3s ease;
    transform-style: preserve-3d;
}

.card-3d:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 40px rgba(160, 108, 213, 0.2),
    0 0 20px rgba(160, 108, 213, 0.1);
}

/* Effet de gradient animé */
@keyframes gradient-shift {
    0% { background-position: 0 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

.gradient-animate {
    background: linear-gradient(45deg, #6247aa, #a06cd5, #e2cfea, #a06cd5, #6247aa);
    background-size: 300% 300%;
    animation: gradient-shift 5s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Effet de brillance sur hover */
.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
            45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 70%
    );
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.shine-effect:hover::before {
    transform: translateX(100%);
}

/* Effet de particules scintillantes */
@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1); }
}

.sparkle {
    position: relative;
}

.sparkle::after {
    content: '✦';
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.6em;
    color: #a06cd5;
    opacity: 0;
    animation: sparkle 2s ease-in-out infinite;
}

/* Amélioration de la photo de profil */
.profile-image-container {
    position: relative;
    transition: all 0.4s ease;
    overflow: visible; /* permet à la pseudo-bordure animée d'être visible */
}

.profile-image-container::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(45deg, #6247aa, #a06cd5, #e2cfea);
    background-size: 300% 300%;
    animation: gradient-shift 3s ease infinite;
    z-index: 0; /* placé derrière l'image mais dans le flux du container */
    opacity: 0;
    transition: opacity 0.4s;
}

.profile-image-container:hover::before {
    opacity: 1;
}

.profile-image-container img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover; /* évite la déformation */
    object-position: center; /* recentre l'image */
    border-radius: 50%;
    position: relative;
    z-index: 1; /* au-dessus de la pseudo-bordure */
}

/* Effet de typing pour le texte */
@keyframes typing-cursor {
    0%, 100% { border-color: transparent; }
    50% { border-color: #a06cd5; }
}

.typing-effect {
    border-right: 2px solid #a06cd5;
    animation: typing-cursor 1s step-end infinite;
}

/* Amélioration des boutons */
.btn-glow {
    position: relative;
    transition: all 0.3s ease;
}

.btn-glow::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, #6247aa, #a06cd5);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
    filter: blur(10px);
}

.btn-glow:hover::after {
    opacity: 0.7;
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(160, 108, 213, 0.4);
}

/* Loading bar animé */
@keyframes load-bar {
    0% { width: 0; }
    100% { width: 100%; }
}

.loading-bar {
    height: 2px;
    background: linear-gradient(90deg, #6247aa, #a06cd5, #e2cfea);
    animation: load-bar 2s ease-out;
}

/* Effet néon pour les titres */
.neon-text {
    text-shadow:
            0 0 5px rgba(160, 108, 213, 0.5),
            0 0 10px rgba(160, 108, 213, 0.4),
            0 0 20px rgba(160, 108, 213, 0.3),
            0 0 40px rgba(160, 108, 213, 0.2);
}

/* Animation de glitch subtile */
@keyframes glitch {
    0% {
        text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.3),
        -0.05em -0.025em 0 rgba(0, 255, 0, 0.3),
        -0.025em 0.05em 0 rgba(0, 0, 255, 0.3);
    }
    14% {
        text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.3),
        -0.05em -0.025em 0 rgba(0, 255, 0, 0.3),
        -0.025em 0.05em 0 rgba(0, 0, 255, 0.3);
    }
    15% {
        text-shadow: -0.05em -0.025em 0 rgba(255, 0, 0, 0.3),
        0.025em 0.025em 0 rgba(0, 255, 0, 0.3),
        -0.05em -0.05em 0 rgba(0, 0, 255, 0.3);
    }
    49% {
        text-shadow: -0.05em -0.025em 0 rgba(255, 0, 0, 0.3),
        0.025em 0.025em 0 rgba(0, 255, 0, 0.3),
        -0.05em -0.05em 0 rgba(0, 0, 255, 0.3);
    }
    50% {
        text-shadow: 0.025em 0.05em 0 rgba(255, 0, 0, 0.3),
        0.05em 0 0 rgba(0, 255, 0, 0.3),
        0 -0.05em 0 rgba(0, 0, 255, 0.3);
    }
    99% {
        text-shadow: 0.025em 0.05em 0 rgba(255, 0, 0, 0.3),
        0.05em 0 0 rgba(0, 255, 0, 0.3),
        0 -0.05em 0 rgba(0, 0, 255, 0.3);
    }
    100% {
        text-shadow: -0.025em 0 0 rgba(255, 0, 0, 0.3),
        -0.025em -0.025em 0 rgba(0, 255, 0, 0.3),
        -0.025em -0.05em 0 rgba(0, 0, 255, 0.3);
    }
}

.glitch-effect:hover {
    animation: glitch 0.3s linear infinite;
}

/* Effet de vague sur hover des sections */
@keyframes wave {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.wave-effect:hover {
    animation: wave 1s ease-in-out infinite;
}

/* Effet de respiration pour les éléments importants */
@keyframes breathe {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.02);
        opacity: 0.9;
    }
}

.breathe-effect {
    animation: breathe 3s ease-in-out infinite;
}

/* Effet de bordure en rotation */
@keyframes rotate-border {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.rotating-border {
    position: relative;
}

.rotating-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, #6247aa, #a06cd5, #e2cfea, #6247aa);
    border-radius: inherit;
    z-index: -1;
    animation: rotate-border 3s linear infinite;
    background-size: 400% 400%;
}

/* Amélioration du contraste pour meilleure lisibilité */
.text-enhanced {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Effet de grille cyberpunk */
.cyber-grid {
    background-image:
            linear-gradient(rgba(160, 108, 213, 0.03) 1px, transparent 1px),
            linear-gradient(90deg, rgba(160, 108, 213, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Animation de changement de langue */
body.lang-switching [data-i18n] {
    animation: fade-text 0.3s ease-in-out;
}

@keyframes fade-text {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
        transform: translateY(-3px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Style du bouton de langue */
#lang-toggle {
    position: relative;
    overflow: hidden;
}

#lang-toggle:hover {
    transform: scale(1.05);
}

#lang-toggle:active {
    transform: scale(0.95);
}

/* Fixer le header en haut et s'assurer qu'il reste au-dessus du contenu (renforcé) */
nav {
    position: fixed !important;
    top: 0 !important;
    margin-top: 0 !important;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 10000 !important;
}

#nav-spacer {
    height: 0;
    width: 100%;
    display: block;
}

/* Forcer aucune marge/padding qui pourrait pousser le header */
:root {
    --safe-top: env(safe-area-inset-top, 0px);
}

html, body {
    margin: 0 !important;
    padding: 0 !important;
}

nav {
    top: var(--safe-top) !important;
    margin: 0 !important;
    transform: none !important;
}

#nav-spacer {
    display: block !important;
}

/* Empêcher que les éléments fixes héritent de transformations (rendering) */
html, body, #app {
    transform: none !important;
}

/* Styles spécifiques pour le formulaire de contact afin d'harmoniser avec le thème */
.form-row {
    margin-bottom: 0.75rem;
}

/* NOTE: we prefer Tailwind utility classes for visual styling of form controls
   to remain consistent with other buttons/controls. Keep only non-visual
   helpers here to avoid conflicts. */

/* Small polish: keep textarea resize behavior */
#contact-form textarea {
    resize: vertical;
    min-height: 140px;
    max-height: 420px;
}

/* Accessibility: focus-visible handling kept globally above */

/* end of form styles */

/* Theme light overrides (appliqué via la classe .theme-light sur <body>) */
body.theme-light {
    --bg-100: #ffffff;
    --bg-200: #f7f6ff;
    --card: #ffffff;
    --accent-500: #7c3aed; /* violet intermédiaire */
    --accent-400: #9f7aea;
    --muted-text: #334155; /* slate-700 */
    --muted-text-2: rgba(51,65,85,0.75);
    background: linear-gradient(120deg, var(--bg-200) 0%, #fbfbff 60%);
    color: var(--muted-text);
}

/* Text colors: remplacer les utilitaires personnalisés par des valeurs lisibles en light mode */
body.theme-light .text-thistle { color: var(--muted-text) !important; }
body.theme-light .text-thistle\/60 { color: rgba(51,65,85,0.6) !important; }
body.theme-light .text-thistle\/70 { color: rgba(51,65,85,0.7) !important; }
body.theme-light .text-thistle\/80 { color: rgba(51,65,85,0.85) !important; }

/* Sections / cards */
body.theme-light .bg-darker-blue\/60 { background: rgba(250,250,255,0.8) !important; }
body.theme-light .bg-darker-blue { background: var(--card) !important; }
body.theme-light .border-lavender-purple { border-color: rgba(124,58,237,0.18) !important; }
body.theme-light .border-lavender-purple\/30 { border-color: rgba(124,58,237,0.12) !important; }
body.theme-light .border-deep-lilac\/40 { border-color: rgba(98,71,170,0.14) !important; }

/* Lisibilité des badges "skills" et "tools" en light mode */
body.theme-light .bg-deep-lilac\/20 { background: rgba(110,76,186,0.06) !important; }
body.theme-light .border-deep-lilac\/40 { border-color: rgba(110,76,186,0.12) !important; }
body.theme-light .border-lavender-purple\/30 { border-color: rgba(124,58,237,0.08) !important; }
body.theme-light .text-thistle\/80 { color: var(--muted-text) !important; }

/* Si des badges utilisent bg-deep-lilac/20 mais pas les utilitaires, cibler les éléments spécifiques */
body.theme-light .btn-glow[role="badge"],
body.theme-light .btn-glow.badge,
body.theme-light .px-3.py-1 { background: rgba(110,76,186,0.06) !important; color: var(--muted-text) !important; border-color: rgba(124,58,237,0.08) !important; }

/* Navigation */
body.theme-light nav {
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(250,250,255,0.9)) !important;
    box-shadow: 0 6px 20px rgba(16,24,40,0.06);
    border-bottom: 1px solid rgba(124,58,237,0.06);
}

/* Buttons and interactive elements */
body.theme-light .btn-glow { color: var(--accent-500) !important; }
body.theme-light .btn-glow::after { background: linear-gradient(45deg, rgba(124,58,237,0.18), rgba(159,122,250,0.14)); }
body.theme-light .btn-glow:hover { box-shadow: 0 6px 28px rgba(124,58,237,0.12); }

body.theme-light .gradient-animate { background: linear-gradient(45deg, #6d28d9, #9f7aea, #c4b5fd); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
body.theme-light .loading-bar { background: linear-gradient(90deg, #6d28d9, #9f7aea, #c4b5fd); }

/* Form controls: clair, bordures douces */
body.theme-light input, body.theme-light textarea {
    background: #ffffff !important;
    color: var(--muted-text) !important;
    border: 1px solid rgba(16,24,40,0.06) !important;
    box-shadow: 0 4px 14px rgba(16,24,40,0.03) inset;
}
body.theme-light ::placeholder { color: rgba(16,24,40,0.35) !important; }

/* Status box */
body.theme-light .bg-lavender-purple\/20 { background: rgba(159,122,250,0.08) !important; color: var(--muted-text) !important; }

/* Particules: adoucir et adapter au fond clair */
body.theme-light canvas#particles-canvas { opacity: 0.55; mix-blend-mode: multiply; filter: saturate(0.9) brightness(0.95) hue-rotate(-10deg); }

/* Images / profile container accent */
body.theme-light .profile-image-container::before { background: linear-gradient(45deg, rgba(124,58,237,0.18), rgba(159,122,250,0.12)); }

/* Links accent */
body.theme-light a { color: var(--accent-500); }
body.theme-light a:hover { color: var(--accent-400); }

/* Small UI helpers */
body.theme-light .terminal-glow:hover { text-shadow: 0 0 6px rgba(124,58,237,0.12); }

/* Ensure focus outlines are visible on light background */
body.theme-light :focus { outline: 3px solid rgba(124,58,237,0.12); outline-offset: 2px; }

/* Tweak shine effect so it's visible but subtle */
body.theme-light .shine-effect::before { background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.6) 50%, transparent 70%); opacity: 0.6; }

/* Make sure footer contrast is good */
body.theme-light footer { background: transparent !important; border-top: 1px solid rgba(16,24,40,0.04); }

/* Minor spacing adjustments to keep rhythm similar to dark version */
body.theme-light .container { padding-top: 1rem !important; padding-bottom: 1rem !important; }

/* Cards: empêcher qu'un hover applique un fond sombre qui rend le texte illisible */
body.theme-light .card-3d,
body.theme-light .ctf-card {
    background: var(--card) !important;
    color: var(--muted-text) !important;
    border-color: rgba(16,24,40,0.04) !important;
}

body.theme-light .card-3d:hover,
body.theme-light .ctf-card:hover {
    background: linear-gradient(180deg, #ffffff, #fbfbff) !important;
    border-color: rgba(124,58,237,0.06) !important;
    box-shadow: 0 10px 30px rgba(16,24,40,0.06) !important;
    transform: translateY(-6px) scale(1.02) !important;
}

/* Forcer les textes internes à rester lisibles sur hover */
body.theme-light .card-3d .text-thistle,
body.theme-light .ctf-card .text-thistle {
    color: var(--muted-text) !important;
}
body.theme-light .card-3d:hover .text-thistle,
body.theme-light .ctf-card:hover .text-thistle {
    color: var(--muted-text) !important;
}

/* Si des utilitaires tailwind appliquent hover:bg-darker-blue/80, neutraliser l'effet en light mode */
body.theme-light [class*="hover:bg-darker-blue"] { background: transparent !important; }

/* Styles pour status-like (utilisé pour skills/tools pour homogénéiser avec #contact-status) */
.status-like {
    padding: 0.75rem;
    border-radius: 0.6rem;
}

/* Dark mode (par défaut) */
.status-like {
    background: rgba(98,71,170,0.06); /* très léger violet */
    color: var(--text, var(--thistle, #e2cfea));
}

.status-like .px-3.py-1,
.status-like .btn-glow[role="badge"],
.status-like .btn-glow.badge {
    background: rgba(98,71,170,0.08) !important;
    border-color: rgba(98,71,170,0.18) !important;
    color: #e9def8 !important;
}

/* Light mode overrides pour status-like (copier le style de contact-status en light mode) */
body.theme-light .status-like {
    background: rgba(159,122,250,0.06) !important; /* subtle lavender */
    border: 1px solid rgba(124,58,237,0.06) !important;
    color: var(--muted-text) !important;
}

body.theme-light .status-like .px-3.py-1,
body.theme-light .status-like .btn-glow[role="badge"],
body.theme-light .status-like .btn-glow.badge {
    background: rgba(159,122,250,0.08) !important;
    border-color: rgba(124,58,237,0.12) !important;
    color: var(--muted-text) !important;
}

/* Make sure inner small text (text-thistle/80) inherits readable color */
.status-like .text-thistle\/80 { color: inherit !important; }
body.theme-light .status-like .text-thistle\/80 { color: inherit !important; }

/* end status-like */

/* Performance tweaks */
.animate-on-scroll { will-change: transform, opacity; }
.card-3d, .ctf-card { will-change: transform; }
.profile-image-container img { display: block; backface-visibility: hidden; -webkit-backface-visibility: hidden; }

/* Limit transitions to transform and opacity to avoid layout paints */
* { transition-property: background-color, border-color, color, opacity, transform; transition-duration: 200ms; transition-timing-function: ease; }

/* Reduce heavy shadows for small screens */
@media (max-width: 768px){
    .btn-glow:hover::after { opacity: 0.3; }
    .card-3d:hover, .ctf-card:hover { box-shadow: 0 6px 18px rgba(16,24,40,0.04) !important; }
}

/* Avoid filter ops on animated elements */
.sparkle, .gradient-animate { will-change: opacity; }

/* Reduce paint cost for shine effect by lowering size */
.shine-effect::before { filter: none; }

/* Improve rendering for fixed background elements */
body::before, #particles-canvas { will-change: transform, opacity; }

/* Prefer GPU for transforms */
.card-3d, .btn-glow, .profile-image-container { transform: translateZ(0); }

/* end performance tweaks */
