@import url("https://fonts.googleapis.com/css2?family=Geist:wght@100..900&display=swap");
@import url("https://unpkg.com/normalize.css") layer(normalize);
@layer normalize, base, components, utilities, text-effect, snap, responsive;

@layer base {

    html,
    body {
        min-height: 100vh;
        margin: 0;
        padding: 0;
        scroll-behavior: smooth;
    }

    * {
        box-sizing: border-box;
    }

    body {
        margin: 0;
        font-family: "Geist", system-ui, sans-serif;
        background-color: #050505;
        color: #fff;
    }

    body::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: -1;

        --dot-color: rgba(255, 255, 255, 0.12);
        --spacing: 24px;
        --dot-size: 1.5px;

        background-image: radial-gradient(var(--dot-color) var(--dot-size),
                transparent var(--dot-size));
        background-size: var(--spacing) var(--spacing);
        background-position: top left;
        background-repeat: repeat;

        mask-image: radial-gradient(circle at top left, #000 0%, transparent 75%);
        mask-size: 100% 100%;
        mask-repeat: no-repeat;
    }
}

@layer components {

    /* ===== CURSOR GLOW ===== */
    .cursor-glow {
        position: fixed;
        width: 600px;
        height: 600px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, rgba(139, 92, 246, 0.03) 40%, transparent 70%);
        pointer-events: none;
        z-index: 0;
        transform: translate(-50%, -50%);
        transition: opacity 0.3s;
        will-change: transform;
    }

    /* ===== GENERAL ===== */
    .no-offset {
        margin: 0;
    }

    .container {
        width: 100%;
        max-width: 1024px;
        padding: 0 16px;
        margin: 0 auto;
    }

    .hero {
        height: 100vh;
        display: flex;
        align-items: center;
    }

    .hero-text {
        font-size: clamp(4rem, 8vw, 8rem);
        font-weight: 800;
        background: linear-gradient(135deg, #fff 0%, #a78bfa 50%, #8b5cf6 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .hero-description {
        font-size: clamp(1rem, 3vw, 2rem);
        font-weight: 400;
        margin-top: 16px;
        color: rgba(255, 255, 255, 0.6);
    }

    /* ===== MARQUEE BANDS ===== */
    .marquee-section {
        padding: 2rem 0;
        overflow: hidden;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        background: rgba(139, 92, 246, 0.03);
    }

    .marquee-track {
        display: flex;
        width: 100%;
        overflow: hidden;
        padding: 0.75rem 0;
    }

    .marquee-track--left .marquee-content {
        animation: marqueeLeft 25s linear infinite;
    }

    .marquee-track--right .marquee-content {
        animation: marqueeRight 30s linear infinite;
    }

    .marquee-content {
        display: flex;
        align-items: center;
        gap: 2rem;
        white-space: nowrap;
        flex-shrink: 0;
        min-width: max-content;
    }

    .marquee-content span {
        font-size: clamp(1.5rem, 3vw, 2.5rem);
        font-weight: 800;
        letter-spacing: 2px;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.15);
        transition: color 0.3s;
    }

    .marquee-track--left .marquee-content span:nth-child(odd):not(:empty) {
        color: rgba(139, 92, 246, 0.3);
    }

    .marquee-track--right .marquee-content span:nth-child(odd):not(:empty) {
        color: rgba(6, 182, 212, 0.25);
    }

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

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

    @keyframes marqueeRight {
        0% {
            transform: translateX(-50%);
        }

        100% {
            transform: translateX(0);
        }
    }

    /* ===== LIST SECTION ===== */
    .list-text {
        font-size: clamp(2.5rem, 6vw, 6rem);
        font-weight: 600;
        position: sticky;
        top: calc(50% - 0.5lh);
        align-self: flex-start;
        /* this is important to make sticky work in a flex container */
        min-width: max-content;
    }

    .list {
        font-size: clamp(2.5rem, 6vw, 6rem);
        font-weight: 600;
        list-style-type: none;
        padding: 0;
    }

    .list li {
        scroll-snap-align: center;
        color: inherit;
    }

    .list li a {
        color: inherit;
        text-decoration: none;
        transition: opacity 0.3s;
    }

    .list li a:hover {
        opacity: 0.7;
    }

    .list-container {
        display: grid;
        grid-template-columns: auto 1fr;
        column-gap: 48px;
    }

    footer a {
        color: inherit;
        text-decoration: none;
    }

    /* ===== BEKOFY SHOWCASE ===== */
    .bekofy-showcase {
        position: relative;
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10vh 5vw;
        overflow: hidden;
    }

    /* Waveform Background */
    .waveform-bg {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 40%;
        display: flex;
        align-items: flex-end;
        justify-content: center;
        gap: 6px;
        padding: 0 5%;
        opacity: 0.08;
        pointer-events: none;
    }

    .waveform-bar {
        flex: 1;
        max-width: 12px;
        height: var(--h, 50%);
        background: linear-gradient(to top, #8b5cf6, #06b6d4);
        border-radius: 4px 4px 0 0;
        animation: waveformPulse 1.8s ease-in-out infinite alternate;
        animation-delay: var(--delay, 0s);
    }

    @keyframes waveformPulse {
        0% {
            transform: scaleY(0.4);
            opacity: 0.5;
        }

        100% {
            transform: scaleY(1);
            opacity: 1;
        }
    }

    .bekofy-showcase-inner {
        position: relative;
        z-index: 1;
        text-align: center;
        max-width: 800px;
    }

    .bekofy-badge {
        display: inline-block;
        padding: 8px 24px;
        background: rgba(139, 92, 246, 0.15);
        border: 1px solid rgba(139, 92, 246, 0.3);
        border-radius: 999px;
        font-size: 0.85rem;
        font-weight: 700;
        letter-spacing: 3px;
        text-transform: uppercase;
        color: #a78bfa;
        margin-bottom: 2rem;
    }

    .bekofy-title {
        font-size: clamp(5rem, 12vw, 12rem);
        font-weight: 900;
        margin: 0;
        line-height: 1;
        background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 50%, #a78bfa 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        filter: drop-shadow(0 0 60px rgba(139, 92, 246, 0.3));
    }

    .bekofy-tagline {
        font-size: clamp(1.2rem, 3vw, 1.8rem);
        color: rgba(255, 255, 255, 0.5);
        margin: 1rem 0 3rem 0;
        font-weight: 300;
    }

    .bekofy-glass-card {
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 24px;
        padding: clamp(2rem, 4vw, 3rem);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        box-shadow:
            0 0 80px rgba(139, 92, 246, 0.05),
            inset 0 0 80px rgba(139, 92, 246, 0.02);
    }

    .bekofy-desc {
        font-size: 1.1rem;
        line-height: 1.7;
        color: rgba(255, 255, 255, 0.65);
        margin: 0 0 2rem 0;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

    .bekofy-features-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        margin-bottom: 2.5rem;
    }

    .bekofy-feature-chip {
        padding: 10px 20px;
        background: rgba(139, 92, 246, 0.2);
        border: 1px solid rgba(139, 92, 246, 0.4);
        border-radius: 12px;
        font-size: 0.95rem;
        font-weight: 700;
        color: #ffffff;
        transition: all 0.3s ease;
        opacity: 1;
    }

    .bekofy-feature-chip:hover {
        background: rgba(139, 92, 246, 0.2);
        border-color: rgba(139, 92, 246, 0.4);
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(139, 92, 246, 0.15);
    }

    .bekofy-cta-row {
        display: flex;
        justify-content: center;
        gap: 16px;
        flex-wrap: wrap;
    }

    .bekofy-btn {
        display: inline-flex;
        align-items: center;
        padding: 14px 36px;
        border-radius: 14px;
        font-size: 1rem;
        font-weight: 700;
        text-decoration: none;
        transition: all 0.3s ease;
        letter-spacing: 0.5px;
    }

    .bekofy-btn--primary {
        background: linear-gradient(135deg, #8b5cf6, #6d28d9);
        color: #fff;
        box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
    }

    .bekofy-btn--primary:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 35px rgba(139, 92, 246, 0.4);
    }

    .bekofy-btn--secondary {
        background: rgba(255, 255, 255, 0.05);
        color: #c4b5fd;
        border: 1px solid rgba(139, 92, 246, 0.3);
    }

    .bekofy-btn--secondary:hover {
        background: rgba(139, 92, 246, 0.1);
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(139, 92, 246, 0.15);
    }

    /* ===== STATS SECTION ===== */
    .stats-section {
        padding: 10vh 5vw;
    }

    .stats-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
        max-width: 900px;
        margin: 0 auto;
    }

    .stat-card {
        text-align: center;
        padding: 2rem 1rem;
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 20px;
        transition: all 0.4s ease;
    }

    .stat-card:hover {
        background: rgba(139, 92, 246, 0.06);
        border-color: rgba(139, 92, 246, 0.2);
        transform: translateY(-5px);
    }

    .stat-number {
        font-size: clamp(2.5rem, 5vw, 3.5rem);
        font-weight: 900;
        background: linear-gradient(135deg, #8b5cf6, #06b6d4);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .stat-suffix {
        font-size: clamp(1.5rem, 3vw, 2rem);
        font-weight: 700;
        color: rgba(255, 255, 255, 0.3);
    }

    .stat-label {
        font-size: 1rem;
        color: rgba(255, 255, 255, 0.4);
        margin-top: 0.5rem;
        font-weight: 500;
    }

    /* ===== HORIZONTAL SCROLL FEATURES ===== */
    .horiz-section {
        position: relative;
        overflow: hidden;
    }

    .horiz-wrapper {
        overflow: hidden;
        padding: 8vh 0;
    }

    .horiz-track {
        display: flex;
        gap: 32px;
        padding: 0 5vw;
        width: max-content;
    }

    .horiz-card {
        width: clamp(300px, 35vw, 400px);
        min-height: 380px;
        flex-shrink: 0;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 24px;
        padding: 2.5rem;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        transition: all 0.4s ease;
        position: relative;
        overflow: hidden;
    }

    .horiz-card::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 24px;
        padding: 1px;
        background: linear-gradient(135deg, var(--accent, #8b5cf6), transparent 60%);
        -webkit-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;
    }

    .horiz-card:hover::before {
        opacity: 1;
    }

    .horiz-card:hover {
        background: rgba(255, 255, 255, 0.05);
        transform: translateY(-8px);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px color-mix(in srgb, var(--accent, #8b5cf6) 15%, transparent);
    }

    .horiz-card-icon {
        font-size: 3rem;
        margin-bottom: 0.5rem;
    }

    .horiz-card h3 {
        font-size: 1.8rem;
        font-weight: 800;
        margin: 0;
    }

    .horiz-card p {
        font-size: 1rem;
        color: rgba(255, 255, 255, 0.5);
        line-height: 1.6;
        margin: 0;
    }

    /* ===== REVEAL CONTAINERS ===== */
    .reveal-container {
        width: 100vw;
        height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin-top: 10vh;
        margin-bottom: 10vh;
    }

    .reveal-line {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 20px;
        width: 100%;
    }

    .reveal-line span {
        font-size: clamp(3rem, 7vw, 7.5rem);
        font-weight: 700;
        letter-spacing: -2px;
        display: inline-block;
        overflow: hidden;
        white-space: nowrap;
    }

    .reveal-img-span {
        height: clamp(60px, 10vw, 110px);
        width: 0;
        border-radius: 5px;
        overflow: hidden;
        position: relative;
    }

    .reveal-img-span img {
        height: 100%;
        width: 300px;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 5px;
        object-fit: cover;
        object-position: center center;
    }

    .tech-reveal-wrapper .reveal-img-span {
        border-radius: 50px;
    }

    .tech-reveal-wrapper .reveal-img-span img {
        object-fit: contain;
        background: #111;
        padding: 10px;
    }

    .section-title {
        font-size: clamp(2rem, 5vw, 4rem);
        margin-bottom: 2rem;
        font-weight: 800;
        text-align: left;
        padding-left: 10px;
    }

    /* ===== PROJECTS MINI GRID ===== */
    .projects-grid-section {
        padding: 5vh 5vw 15vh 5vw;
    }

    .projects-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 24px;
        max-width: 1000px;
        margin: 0 auto;
    }

    .project-mini-card {
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 20px;
        padding: 2rem;
        text-decoration: none;
        color: #fff;
        transition: all 0.4s ease;
        position: relative;
        overflow: hidden;
    }

    .project-mini-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: var(--accent, #8b5cf6);
        opacity: 0;
        transition: opacity 0.4s;
    }

    .project-mini-card:hover::before {
        opacity: 1;
    }

    .project-mini-card:hover {
        background: rgba(255, 255, 255, 0.05);
        transform: translateY(-5px);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .project-mini-icon {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .project-mini-card h3 {
        font-size: 1.4rem;
        font-weight: 800;
        margin: 0 0 0.5rem 0;
    }

    .project-mini-card p {
        font-size: 0.95rem;
        color: rgba(255, 255, 255, 0.5);
        line-height: 1.5;
        margin: 0 0 1rem 0;
    }

    .project-mini-tags {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }

    .project-mini-tags span {
        padding: 4px 12px;
        background: rgba(255, 255, 255, 0.06);
        border-radius: 8px;
        font-size: 0.8rem;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.4);
    }

    /* ===== SECTION ANIMATE ===== */
    .section-animate {
        opacity: 0;
        transform: translateY(40px);
    }

    /* ===== FOOTER ===== */
    footer {
        padding: 3rem 0;
        text-align: center;
    }

    footer p {
        color: rgba(255, 255, 255, 0.3);
        font-size: 0.9rem;
    }

    footer a {
        color: rgba(255, 255, 255, 0.5);
        text-decoration: none;
        transition: color 0.3s;
    }

    footer a:hover {
        color: #a78bfa;
    }
}

@layer text-effect {
    :root {
        --count: 15;
        --end: 360;
        --step: calc(var(--end) / var(--count));
    }

    .list li:not(:last-of-type) {
        color: oklch(65% 0.3 calc(var(--i) * var(--step)));
    }

    @supports (animation-timeline: scroll()) and (animation-range: 0% 100%) {
        .list li:first-of-type {
            --start-opacity: 1;
        }

        .list li:last-of-type {
            --end-opacity: 1;
        }

        .list li {
            opacity: 0.2;
            animation-name: brighten;
            animation-fill-mode: both;
            animation-timing-function: linear;

            animation-timeline: view();
            animation-range: cover calc(50% - 1lh) calc(50% + 1lh);
        }

        @keyframes brighten {
            0% {
                opacity: var(--start-opacity, 0.2);
            }

            50% {
                opacity: 1;
            }

            100% {
                opacity: var(--end-opacity, 0.2);
            }
        }
    }
}

@layer snap {
    /* Scroll snapping removed for smoother experience */
}

@layer responsive {
    @media (max-width: 768px) {
        .list-container {
            column-gap: 12px;
        }

        .stats-grid {
            grid-template-columns: repeat(2, 1fr);
        }

        .horiz-card {
            width: 280px;
            min-height: 320px;
            padding: 2rem;
        }

        .bekofy-title {
            font-size: clamp(4rem, 15vw, 8rem);
        }

        .bekofy-cta-row {
            flex-direction: column;
            align-items: center;
        }

        .bekofy-btn {
            width: 100%;
            max-width: 280px;
            justify-content: center;
        }
    }

    @media (max-width: 480px) {
        .stats-grid {
            grid-template-columns: 1fr 1fr;
            gap: 12px;
        }

        .marquee-content span {
            font-size: 1.2rem;
        }

        .projects-grid {
            grid-template-columns: 1fr;
        }
    }
}
