/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6C5CE7;
    --primary-light: #A29BFE;
    --secondary: #00CEC9;
    --accent: #FD79A8;
    --accent-2: #FDCB6E;
    --accent-3: #00B894;
    --dark: #0A0A1A;
    --dark-2: #12122A;
    --dark-3: #1A1A3E;
    --text: #E8E8F0;
    --text-muted: #8888AA;
    --white: #FFFFFF;
    --gradient-1: linear-gradient(135deg, #6C5CE7, #00CEC9);
    --gradient-2: linear-gradient(135deg, #FD79A8, #FDCB6E);
    --gradient-3: linear-gradient(135deg, #00B894, #00CEC9);
    --gradient-vibrant: linear-gradient(135deg, #6C5CE7, #FD79A8, #FDCB6E, #00CEC9);
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--dark);
}

body {
    font-family: var(--font-body);
    background: var(--dark);
    color: var(--text);
    overflow-x: hidden;
    cursor: default;
}

::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--dark);
}
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

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

img {
    max-width: 100%;
    display: block;
}

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

/* ===== PARTICLES CANVAS ===== */
#particlesCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.2rem 2rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar.scrolled {
    background: rgba(10, 10, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(108, 92, 231, 0.15);
    padding: 0.8rem 2rem;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--white);
    letter-spacing: -0.02em;
}

.nav-logo img {
    height: 40px;
    width: auto;
}

.nav-logo strong {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.3s;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 1px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
}

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

/* ===== HERO ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    overflow: hidden;
    z-index: 1;
}

.hero-bg-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -10%;
    right: -5%;
    animation-delay: 0s;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: var(--accent);
    bottom: -5%;
    left: -5%;
    animation-delay: -5s;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: var(--secondary);
    top: 40%;
    left: 30%;
    animation-delay: -10s;
}

.shape-4 {
    width: 200px;
    height: 200px;
    background: var(--accent-2);
    top: 20%;
    left: 10%;
    animation-delay: -15s;
}

.shape-5 {
    width: 350px;
    height: 350px;
    background: var(--accent-3);
    bottom: 10%;
    right: 20%;
    animation-delay: -8s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(40px, 30px) scale(1.02); }
}

.hero-container {
    position: relative;
    z-index: 2;
    max-width: 900px;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    background: rgba(108, 92, 231, 0.15);
    border: 1px solid rgba(108, 92, 231, 0.3);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary-light);
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-3);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
}

.title-line {
    display: block;
    opacity: 0;
    transform: translateY(60px);
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-2 {
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-3 {
    background: var(--gradient-3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 550px;
    margin: 0 auto 2.5rem;
    opacity: 0;
    transform: translateY(30px);
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(30px);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 2rem;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-1);
    color: var(--white);
    box-shadow: 0 4px 25px rgba(108, 92, 231, 0.35);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 40px rgba(108, 92, 231, 0.5);
}

.btn-primary svg {
    transition: transform 0.3s;
}

.btn-primary:hover svg {
    transform: translate(3px, -3px);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
    border-color: var(--primary-light);
    background: rgba(108, 92, 231, 0.1);
    transform: translateY(-3px);
}

.btn-large {
    padding: 1.1rem 2.5rem;
    font-size: 1.05rem;
}

/* ===== STATS ===== */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    opacity: 0;
    transform: translateY(30px);
}

.stat {
    text-align: center;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-suffix {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
}

.scroll-indicator span {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--primary), transparent);
    animation: scroll-pulse 2s infinite;
}

@keyframes scroll-pulse {
    0% { transform: scaleY(0); transform-origin: top; opacity: 1; }
    50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
    50.01% { transform: scaleY(1); transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; opacity: 1; }
}

/* ===== PORTFOLIO ===== */
.portfolio {
    position: relative;
    z-index: 1;
    padding: 8rem 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-tag {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    background: rgba(253, 121, 168, 0.12);
    border: 1px solid rgba(253, 121, 168, 0.25);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.2rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ===== PORTFOLIO GRID ===== */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== PORTFOLIO CARD ===== */
.portfolio-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: var(--dark-2);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.portfolio-card:hover {
    transform: translateY(-10px);
}

.card-glow {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s;
    z-index: 0;
    border-radius: 20px;
}

.portfolio-card:nth-child(1) .card-glow {
    box-shadow: 0 0 60px rgba(240, 78, 35, 0.2), inset 0 0 60px rgba(240, 78, 35, 0.05);
}

.portfolio-card:nth-child(2) .card-glow {
    box-shadow: 0 0 60px rgba(255, 107, 53, 0.2), inset 0 0 60px rgba(255, 107, 53, 0.05);
}

.portfolio-card:nth-child(3) .card-glow {
    box-shadow: 0 0 60px rgba(108, 92, 231, 0.2), inset 0 0 60px rgba(108, 92, 231, 0.05);
}

.portfolio-card:hover .card-glow {
    opacity: 1;
}

.card-border {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color 0.5s;
    z-index: 1;
    pointer-events: none;
}

.portfolio-card:hover .card-border {
    border-color: rgba(255, 255, 255, 0.15);
}

.card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-image {
    position: relative;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-image-bg {
    position: absolute;
    inset: 0;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-card:hover .card-image-bg {
    transform: scale(1.08);
}

.card-bg-1 {
    background: linear-gradient(135deg, #1A1A2E 0%, #2D1810 50%, #1A1A2E 100%);
}

.card-bg-2 {
    background: linear-gradient(135deg, #1A1020 0%, #2A1530 50%, #101828 100%);
}

.card-bg-3 {
    background: linear-gradient(135deg, #0A1A15 0%, #102A20 50%, #0A1528 100%);
}

.card-logo {
    position: relative;
    z-index: 2;
    max-width: 200px;
    max-height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-logo-square {
    max-width: 100px;
    max-height: 100px;
    border-radius: 16px;
}

.portfolio-card:hover .card-logo {
    transform: scale(1.1);
}

.card-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.tag {
    padding: 0.25rem 0.7rem;
    border-radius: 50px;
    background: rgba(108, 92, 231, 0.12);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    letter-spacing: -0.02em;
}

.card-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    flex: 1;
}

.card-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.card-link-text {
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-footer svg {
    stroke: var(--primary-light);
    transition: transform 0.3s;
}

.portfolio-card:hover .card-footer svg {
    transform: translate(4px, -4px);
}

/* ===== CTA SECTION ===== */
.cta-section {
    position: relative;
    z-index: 1;
    padding: 8rem 2rem;
    text-align: center;
    overflow: hidden;
}

.cta-bg-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(108, 92, 231, 0.15) 0%, transparent 70%);
    z-index: 0;
}

.cta-container {
    position: relative;
    z-index: 1;
    max-width: 650px;
    margin: 0 auto;
}

.cta-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

/* ===== FOOTER ===== */
.footer {
    position: relative;
    z-index: 1;
    padding: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
}

.footer-logo img {
    height: 30px;
    width: auto;
}

.footer-logo strong {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-text {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .stat-divider {
        width: 40px;
        height: 1px;
    }
}

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

    .nav-links {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.8rem;
    }

    .hero {
        padding: 7rem 1.2rem 3rem;
    }

    .hero-title {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }

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

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

    .portfolio {
        padding: 4rem 1.2rem;
    }

    .section-header {
        margin-bottom: 3rem;
    }

    .footer-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
