*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: #030303;
    color: #fafafa;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

::selection {
    background: rgba(163, 230, 53, 0.3);
    color: #fff;
}

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

::-webkit-scrollbar-track {
    background: #050505;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #a3e635 0%, #65a30d 100%);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #bef264 0%, #84cc16 100%);
}

/* Noise Texture */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ========== GRADIENT ORBS ========== */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.35;
    pointer-events: none;
    will-change: transform;
}

.orb-1 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(163, 230, 53, 0.18) 0%, rgba(132, 204, 22, 0.05) 50%, transparent 70%);
    top: -15%;
    right: -15%;
}

.orb-2 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(132, 204, 22, 0.12) 0%, rgba(101, 163, 13, 0.03) 50%, transparent 70%);
    bottom: 5%;
    left: -12%;
}

.orb-3 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.04) 0%, transparent 70%);
    top: 40%;
    left: 30%;
}

/* ========== PARTICLE CANVAS ========== */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}

/* ========== TEXT REVEAL ========== */
.reveal-line {
    transform: translateY(115%);
    opacity: 0;
    will-change: transform, opacity;
}

.char {
    display: inline-block;
    transform: translateY(100%);
    opacity: 0;
}

/* ========== MAGNETIC BUTTON ========== */
.magnetic-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform;
}

.magnetic-btn::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, rgba(163, 230, 53, 0.6), transparent 40%, rgba(163, 230, 53, 0.4));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.magnetic-btn:hover::before {
    opacity: 1;
}

/* Primary CTA glow */
.cta-primary {
    position: relative;
    overflow: hidden;
}

.cta-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s;
}

.cta-primary:hover::after {
    opacity: 1;
}

.cta-primary:hover {
    box-shadow: 0 0 40px rgba(163, 230, 53, 0.3), 0 0 80px rgba(163, 230, 53, 0.1);
}

/* ========== GLASS CARD ========== */
.glass-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(163, 230, 53, 0.03), transparent);
    transition: left 0.8s ease;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(163, 230, 53, 0.25);
    transform: translateY(-6px);
    box-shadow:
        0 25px 50px -15px rgba(0, 0, 0, 0.6),
        0 0 40px -10px rgba(163, 230, 53, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ========== SKILL TAG ========== */
.skill-tag {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.skill-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(163, 230, 53, 0.15), transparent);
    transition: left 0.6s;
}

.skill-tag:hover::before {
    left: 100%;
}

.skill-tag:hover {
    border-color: rgba(163, 230, 53, 0.4);
    color: #a3e635;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(163, 230, 53, 0.1);
}

/* ========== TIMELINE ========== */
.timeline-line {
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom,
            transparent,
            rgba(163, 230, 53, 0.15) 20%,
            rgba(163, 230, 53, 0.4) 50%,
            rgba(163, 230, 53, 0.15) 80%,
            transparent);
}

.timeline-dot {
    box-shadow: 0 0 20px rgba(163, 230, 53, 0.5), 0 0 40px rgba(163, 230, 53, 0.2);
    transition: box-shadow 0.4s ease;
}

.timeline-dot:hover {
    box-shadow: 0 0 30px rgba(163, 230, 53, 0.7), 0 0 60px rgba(163, 230, 53, 0.3);
}

/* ========== CUSTOM CURSOR (CROSSHAIR) ========== */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    z-index: 10001;
    pointer-events: none;
    will-change: transform, left, top;
}

/* Crosshair center — a tiny plus sign made of pseudo-elements */
.cursor-dot {
    width: 20px;
    height: 20px;
    background: transparent;
    mix-blend-mode: difference;
}

.cursor-dot::before,
.cursor-dot::after {
    content: '';
    position: absolute;
    background: #a3e635;
    border-radius: 1px;
    transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Vertical bar */
.cursor-dot::before {
    width: 1.5px;
    height: 16px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Horizontal bar */
.cursor-dot::after {
    width: 16px;
    height: 1.5px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* On hover — crosshair collapses into a single dot */
.cursor-dot.hover::before {
    height: 4px;
    width: 4px;
    border-radius: 50%;
}

.cursor-dot.hover::after {
    width: 4px;
    height: 4px;
    border-radius: 50%;
}

/* Trailing ring — very subtle */
.cursor-outline {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(163, 230, 53, 0.18);
    background: transparent;
    transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1),
        height 0.4s cubic-bezier(0.23, 1, 0.32, 1),
        background-color 0.4s,
        border-color 0.4s,
        opacity 0.4s;
    opacity: 1;
}

/* On hover — ring expands into a soft glow disc */
.cursor-outline.hover {
    width: 56px;
    height: 56px;
    background-color: rgba(163, 230, 53, 0.06);
    border-color: rgba(163, 230, 53, 0.35);
}

/* ========== MARQUEE ========== */
.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
    display: inline-block;
    animation: marquee 35s linear infinite;
    will-change: transform;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ========== GRID BACKGROUND ========== */
.grid-bg {
    background-size: 60px 60px;
    background-image:
        linear-gradient(to right, rgba(163, 230, 53, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(163, 230, 53, 0.03) 1px, transparent 1px);
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

/* ========== SECTION TRANSITIONS ========== */
.section-fade {
    opacity: 0;
    transform: translateY(50px);
    will-change: transform, opacity;
}

/* ========== LINK UNDERLINE ========== */
.link-hover {
    position: relative;
}

.link-hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, #a3e635, #65a30d);
    transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.link-hover:hover::after {
    width: 100%;
}

/* ========== LOADING SCREEN ========== */
.loader {
    position: fixed;
    inset: 0;
    background: #030303;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 24px;
}

.loader-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    overflow: hidden;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #ffffff, #a3e635);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loader-bar {
    width: 240px;
    height: 2px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.loader-bar::after {
    content: '';
    position: absolute;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #a3e635, #65a30d);
    border-radius: 2px;
    animation: load 1.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes load {
    to {
        left: 0;
    }
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== PROJECT CARD ========== */
.project-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.project-card .project-image-area {
    position: relative;
    overflow: hidden;
}

.project-card .project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(163, 230, 53, 0.0) 0%,
            rgba(163, 230, 53, 0.0) 100%);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-card:hover .project-overlay {
    background: linear-gradient(135deg,
            rgba(163, 230, 53, 0.08) 0%,
            rgba(0, 0, 0, 0.2) 100%);
}

.project-card .project-icon-wrap {
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.project-card:hover .project-icon-wrap {
    transform: scale(1.15) rotate(5deg);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(163, 230, 53, 0.15);
}

/* ========== SECTION DIVIDER ========== */
.section-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(163, 230, 53, 0.2), transparent);
}

/* ========== FLOATING BADGE ========== */
.status-badge {
    animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(163, 230, 53, 0.15);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(163, 230, 53, 0);
    }
}

/* ========== GLOWING TEXT ========== */
.glow-text {
    text-shadow: 0 0 40px rgba(163, 230, 53, 0.15);
}

/* ========== ABOUT CARD CODE SNIPPET ========== */
.code-snippet {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    opacity: 0.4;
    transition: opacity 0.4s;
}

.glass-card:hover .code-snippet {
    opacity: 0.7;
}

/* ========== STAT COUNTER ========== */
.stat-number {
    font-variant-numeric: tabular-nums;
}

/* ========== HORIZONTAL SCROLL SECTION ========== */
.skills-horizontal {
    display: flex;
    gap: 1.5rem;
    will-change: transform;
}

/* ========== CONTACT SECTION GLOW ========== */
.contact-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(163, 230, 53, 0.08) 0%, transparent 70%);
    filter: blur(80px);
    pointer-events: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ========== FOOTER GRADIENT ========== */
footer {
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(163, 230, 53, 0.3), transparent);
}

/* ========== NAV ACTIVE DOT ========== */
.nav-dot {
    position: relative;
}

.nav-dot::before {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #a3e635;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.nav-dot.active::before,
.nav-dot:hover::before {
    transform: translateX(-50%) scale(1);
}

/* ========== TEXT SPLIT CHARS ========== */
.split-char {
    display: inline-block;
    will-change: transform, opacity;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {

    .cursor-dot,
    .cursor-outline {
        display: none !important;
    }

    .orb-1 {
        width: 350px;
        height: 350px;
    }

    .orb-2 {
        width: 280px;
        height: 280px;
    }

    .orb-3 {
        width: 200px;
        height: 200px;
    }
}