/* ===== Custom Animations ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

@keyframes pulse-slow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

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

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

@keyframes scale-in {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 180, 216, 0.3); }
    50% { box-shadow: 0 0 40px rgba(0, 180, 216, 0.6); }
}

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

.animate-pulse-slow {
    animation: pulse-slow 4s ease-in-out infinite;
}

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

.animate-fade-up {
    animation: fade-up 0.8s ease-out forwards;
}

.animate-slide-in-left {
    animation: slide-in-left 0.8s ease-out forwards;
}

.animate-slide-in-right {
    animation: slide-in-right 0.8s ease-out forwards;
}

.animate-scale-in {
    animation: scale-in 0.6s ease-out forwards;
}

.animation-direction-reverse {
    animation-direction: reverse;
}

.animation-delay-1500 {
    animation-delay: 1.5s;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-3000 {
    animation-delay: 3s;
}

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* ===== Navigation ===== */
#navbar.scrolled {
    background: rgba(10, 15, 30, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(46, 61, 107, 0.2);
}

.nav-link {
    color: rgba(255, 255, 255, 0.7);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #00b4d8, #7b2ff7);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

.nav-link.active {
    color: #00b4d8;
}

/* ===== Project Filter ===== */
.project-filter {
    background: rgba(21, 29, 56, 0.5);
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(46, 61, 107, 0.2);
}

.project-filter:hover {
    background: rgba(21, 29, 56, 0.8);
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 180, 216, 0.3);
}

.project-filter.active {
    background: linear-gradient(to right, #00b4d8, #7b2ff7);
    color: white;
    border-color: transparent;
}

/* ===== Project Card ===== */
.project-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card.hidden-card {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    position: absolute;
}

.project-card.visible-card {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    position: relative;
}

/* ===== Line Clamp ===== */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

::-webkit-scrollbar-track {
    background: #0a0f1e;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #00b4d8, #7b2ff7);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #00b4d8, #7b2ff7);
}

/* ===== Selection ===== */
::selection {
    background: rgba(0, 180, 216, 0.3);
    color: white;
}

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

/* ===== Mobile Menu ===== */
#mobileMenu.show {
    display: block;
    animation: fade-up 0.3s ease-out;
}

/* ===== Toast Notification ===== */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 9999;
    animation: fade-up 0.3s ease-out;
    max-width: 400px;
}

.toast-success {
    background: linear-gradient(to right, #00f5a0, #00d9f5);
    color: #040711;
}

.toast-error {
    background: linear-gradient(to right, #ff416c, #ff4b2b);
}

.toast-info {
    background: linear-gradient(to right, #00b4d8, #7b2ff7);
}

/* ===== Particles ===== */
.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(0, 180, 216, 0.5);
    border-radius: 50%;
    animation: float-particle linear infinite;
}

@keyframes float-particle {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

/* ===== Active Section Indicator ===== */
section {
    position: relative;
}

/* ===== Admin Panel Grid ===== */
.admin-card {
    background: rgba(15, 22, 41, 0.5);
    border: 1px solid rgba(46, 61, 107, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.admin-card:hover {
    border-color: rgba(0, 180, 216, 0.3);
    transform: translateY(-2px);
}

/* ===== Form Focus Styles ===== */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.1);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 640px) {
    .grid {
        gap: 1rem;
    }
}