/* ── CSS variables & gradient helpers ──────────────────────────────────── */
:root {
    --gradient-1: linear-gradient(145deg, #00d4ff, #9b59b6);
    --gradient-2: linear-gradient(145deg, #c5ff4d, #27ae60);
    --gradient-3: linear-gradient(145deg, #ff006e, #f39c12);
    --gradient-4: linear-gradient(145deg, #8422ff, #2965f1);
}

body {
    font-family: 'Lexend', sans-serif;
}

.grad-text-1 {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.grad-bg-1 {
    background: var(--gradient-1);
}

.grad-bg-2 {
    background: var(--gradient-2);
}

/* ── Animations ─────────────────────────────────────────────────────────── */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wave {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes gridScroll {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

@keyframes orbFloat {

    0%,
    100% {
        transform: translate(0, 0);
    }

    33% {
        transform: translate(40px, -40px) scale(1.05);
    }

    66% {
        transform: translate(-40px, 40px) scale(.95);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out both;
}

.animate-fadeIn {
    animation: fadeIn 1s ease-out both;
}

/* ── Background grid lines ──────────────────────────────────────────────── */
.bg-grid-lines {
    background-image: linear-gradient(rgba(0, 212, 255, .03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, .03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridScroll 20s linear infinite;
}

/* ── Navbar underline ────────────────────────────────────────────────────── */
.nav-link {
    position: relative;
    padding-bottom: 4px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width .3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: #00d4ff;
}

/* ── Mobile menu ─────────────────────────────────────────────────────────── */
.mobile-menu {
    position: fixed;
    top: 81px;
    left: -100%;
    width: 260px;
    height: calc(100vh - 81px);
    background: #0a0e1a;
    transition: left .6s ease;
    overflow-y: auto;
    z-index: 999;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-item {
    opacity: 0;
    transform: translateX(-20px);
    transition: all .3s ease;
}

.mobile-menu.active .mobile-menu-item {
    opacity: 1;
    transform: translateX(0);
}

.mobile-menu.active .mobile-menu-item:nth-child(1) {
    transition-delay: .10s;
}

.mobile-menu.active .mobile-menu-item:nth-child(2) {
    transition-delay: .15s;
}

.mobile-menu.active .mobile-menu-item:nth-child(3) {
    transition-delay: .20s;
}

.mobile-menu.active .mobile-menu-item:nth-child(4) {
    transition-delay: .25s;
}

/* ── Filter button – gradient slide-in on active/hover ───────────────────── */
.filter-btn {
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    transition: left .4s ease;
    z-index: -1;
}

.filter-btn:hover::before {
    left: 0;
}

.filter-btn.active {
    background: var(--gradient-1);
    border-color: transparent !important;
    color: white !important;
    box-shadow: 0 8px 30px rgba(0, 212, 255, .3);
}

/* ── Project card – per nth-child gradient glow overlay ──────────────────── */
.project-card {
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity .5s ease;
    z-index: 0;
    border-radius: 20px;
}

.project-card:nth-child(3n+2)::before {
    background: var(--gradient-2);
}

.project-card:nth-child(3n+3)::before {
    background: var(--gradient-3);
}

.project-card:hover::before {
    opacity: .03;
}

/* ── Category colour per nth-child ───────────────────────────────────────── */
.project-card:nth-child(3n+2) .project-category {
    color: #c5ff4d;
}

.project-card:nth-child(3n+3) .project-category {
    color: #ff006e;
}

/* ── Link icon hover colour per nth-child ────────────────────────────────── */
.project-card:nth-child(3n+2) .project-link:hover {
    background: #c5ff4d;
    border-color: #c5ff4d;
}

.project-card:nth-child(3n+3) .project-link:hover {
    background: #ff006e;
    border-color: #ff006e;
}

/* ── Orb decorations ─────────────────────────────────────────────────────── */
.orb {
    animation: orbFloat 25s ease-in-out infinite;
}

.orb-2 {
    animation-delay: 8s;
}

.orb-3 {
    animation-delay: 16s;
}

.link_projects {
    position: relative;
    padding-left: 0;
    display: inline-block;
    transition: all .3s ease;
}

.link_projects:hover {
    text-decoration: underline;
}

.link_projects::before {
    content: '→';
    position: absolute;
    left: -20px;
    opacity: 0;
    transition: all .3s ease;
    color: #00d4ff;
}

.link_projects:hover::before {
    left: -16px;
    opacity: 1;
}