[x-cloak] { display: none !important; }

/* Prevent scrollbar-induced layout shift (especially in Firefox) */
html {
    overflow-y: scroll;
}

/* Navigation gradient backdrop */
.nav-gradient {
    background: linear-gradient(to bottom, rgb(243 244 246) 0%, rgb(243 244 246) 85%, transparent 100%);
}
.dark .nav-gradient {
    background: linear-gradient(to bottom, rgb(3 7 18) 0%, rgb(3 7 18) 85%, transparent 100%);
}

/* Dark mode icon visibility via CSS to prevent layout shift */
.dark-mode-icon-sun { display: none; }
.dark-mode-icon-moon { display: block; }
.dark .dark-mode-icon-sun { display: block; }
.dark .dark-mode-icon-moon { display: none; }

/* Logo blinking cursor */
.ll-cursor {
    display: inline-block;
    width: 0.45em;
    height: 0.95em;
    margin-left: 0.12em;
    vertical-align: -0.08em;
    background: #16a34a;
    animation: ll-blink 1.2s steps(1) infinite;
}
.dark .ll-cursor {
    background: #4ade80;
}
@keyframes ll-blink {
    50% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .ll-cursor { animation: none; }
}

/* 404 page floating bubble animation */
@keyframes float404 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
