:root {
    /* Colors - Electric Blue Scale */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    /* Base */
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;
    --primary-rgb: 59, 130, 246;

    /* Backgrounds */
    --bg-primary: #000000;
    --bg-secondary: #09090b;
    --bg-tertiary: #18181b;

    /* Texts */
    --text-primary: #ffffff;
    --text-secondary: #e4e4e7;
    --text-tertiary: #a1a1aa;
    --text-quaternary: #71717a;

    /* Accents */
    --success: #22c55e;
    --info: #3b82f6;
    --warning: #f59e0b;

    /* Spacing & Transitions */
    --transition-base: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none !important;
    /* Force hide everywhere */
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
}

body.no-scroll {
    overflow: hidden;
}

h1,
h2,
h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Glassmorphism utility */
.glass-card {
    background: linear-gradient(135deg,
            rgba(var(--primary-rgb), 0.08) 0%,
            rgba(var(--primary-rgb), 0.04) 50%,
            rgba(var(--primary-rgb), 0.08) 100%);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(var(--primary-rgb), 0.15);
    border-radius: 24px;
    padding: 32px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.3),
        0 2px 4px -2px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
    transition: var(--transition-base);
}

.glass-card:not(.service-card-back):hover {
    border-color: rgba(var(--primary-rgb), 0.35);
    box-shadow: 0 25px 50px -12px rgba(var(--primary-rgb), 0.35);
    transform: translateY(-4px);
}

/* Particle system background */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 24px 0;
    transition: var(--transition-base);
}

.navbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.1);
    padding: 16px 0;
}

.logo.text-logo {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.logo.text-logo span {
    color: var(--primary-500);
    text-shadow: 0 0 15px rgba(var(--primary-rgb), 0.6);
}

.navbar.scrolled .logo.text-logo {
    font-size: 24px;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    z-index: 1100;
}

.hamburger .bar {
    width: 30px;
    height: 2px;
    background-color: var(--text-primary);
    transition: var(--transition-base);
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-500);
    transition: width 0.3s ease;
}

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

/* Button Styles */
.btn-primary,
.btn-primary-sm {
    background: linear-gradient(135deg,
            var(--primary-600) 0%,
            var(--primary-500) 30%,
            var(--primary-400) 60%,
            var(--primary-500) 100%);
    background-size: 200% 200%;
    animation: gradient-shift 4s ease infinite;
    color: #ffffff;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: var(--transition-base);
}

.btn-primary {
    padding: 16px 32px;
    font-size: 18px;
    display: inline-block;
}

.btn-primary-sm {
    padding: 10px 20px;
    font-size: 14px;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    filter: brightness(1.1);
}

.btn-outline {
    padding: 16px 32px;
    font-size: 18px;
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    border-radius: 12px;
    color: var(--text-primary);
    font-weight: 600;
}

.btn-outline:hover {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: var(--primary-500);
}

/* Hero Styles */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    background: radial-gradient(circle at 50% 10%, rgba(var(--primary-rgb), 0.1) 0%, transparent 60%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
}

.label {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 100px;
    color: var(--primary-400);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 76px;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.glow-text {
    color: var(--primary-500);
    text-shadow: 0 0 30px rgba(var(--primary-rgb), 0.5);
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 540px;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

/* Sphere & Visual */
.sphere {
    width: 450px;
    height: 450px;
    position: relative;
    margin: 0 auto;
}

.sphere-inner {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, rgba(var(--primary-rgb), 0.4), transparent);
    border-radius: 50%;
    filter: blur(40px);
    z-index: -1;
}

.hero-svg {
    width: 100%;
    height: 100%;
}

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

/* Services Styles */
.services {
    padding: 120px 0;
    background-color: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-size: 48px;
    margin-bottom: 16px;
}

.section-subtitle {
    color: var(--text-tertiary);
    font-size: 18px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

/* Service Card Flip */
.service-card-flip {
    height: 400px;
    perspective: 1500px;
    cursor: pointer;
    position: relative;
}

.service-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

/* Stable trigger: The card flips when it has the .is-flipped class */
.service-card-flip.is-flipped .service-card-inner {
    transform: rotateY(180deg);
}

.service-card-front,
.service-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 24px;
    top: 0;
    left: 0;
}

.service-card-front {
    background: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    text-align: center;
    z-index: 2;
    position: relative;
}

.flip-hint {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--primary-400);
    opacity: 0.6;
    transition: var(--transition-base);
    animation: hint-pulse 2s ease-in-out infinite;
}

.service-card-flip:hover .flip-hint {
    opacity: 1;
    transform: scale(1.1);
}

.flip-hint i {
    width: 20px;
    height: 20px;
}

@keyframes hint-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.15);
        opacity: 1;
    }
}

.service-icon-box {
    width: 80px;
    height: 80px;
    background: rgba(var(--primary-rgb), 0.1);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    margin-bottom: 24px;
    border: 1px solid rgba(var(--primary-rgb), 0.2);
}

.service-card-back {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    background: var(--bg-tertiary);
    /* Added solid background to prevent see-through */
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    /* Slightly more prominent border for the back */
}

.feature-tags {
    display: flex;
    gap: 8px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.tag {
    padding: 4px 12px;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-300);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}

/* Animations */
.orbit {
    transform-origin: center;
}

.orbit-1 {
    animation: rotate 20s linear infinite;
}

.orbit-2 {
    animation: rotate 15s linear reverse infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.pulse-soft {
    animation: pulse-soft 4s ease-in-out infinite;
    transform-origin: center;
}

@keyframes pulse-soft {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
}

.pulse-fast {
    animation: pulse-fast 2s ease-in-out infinite;
    transform-origin: center;
}

@keyframes pulse-fast {

    0%,
    100% {
        transform: scale(1);
        filter: blur(0px);
    }

    50% {
        transform: scale(1.2);
        filter: blur(5px);
    }
}

/* Floating nodes with different timings */
.float-node-1 {
    animation: float-node 6s ease-in-out infinite;
}

.float-node-2 {
    animation: float-node 8s ease-in-out 1s infinite;
}

.float-node-3 {
    animation: float-node 7s ease-in-out 0.5s infinite;
}

@keyframes float-node {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(10px, -15px);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(1deg);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow:
            0 0 0 1px rgba(var(--primary-rgb), 0.5),
            0 4px 24px rgba(var(--primary-rgb), 0.4),
            0 0 60px rgba(var(--primary-rgb), 0.3);
    }

    50% {
        box-shadow:
            0 0 0 2px rgba(var(--primary-rgb), 0.8),
            0 8px 40px rgba(var(--primary-rgb), 0.6),
            0 0 80px rgba(var(--primary-rgb), 0.5);
    }
}

@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transition: var(--transition-base);
}

.reveal.animate-in {
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Projects Styles */
.projects {
    padding: 120px 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.project-card {
    padding: 0;
    overflow: hidden;
}

.project-image-placeholder svg {
    display: block;
    width: 100%;
    height: auto;
}

.project-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: rgba(var(--primary-rgb), 0.05);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-info {
    padding: 32px;
}

.project-info h3 {
    margin-bottom: 12px;
}

.project-info p {
    color: var(--text-tertiary);
    margin-bottom: 24px;
}

.project-link {
    color: var(--primary-400);
    font-weight: 600;
}

/* About Styles */
.about {
    padding: 120px 0;
    background-color: var(--bg-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: center;
}

.avatar-box {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
}

.avatar-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--primary-500);
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
}

.avatar-circle {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--bg-tertiary);
    border: 2px solid rgba(var(--primary-rgb), 0.3);
    border-radius: 50%;
    overflow: hidden;
    /* Ensure image stays in circle */
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.about-text-container {
    margin-bottom: 40px;
}

.about-text {
    margin-bottom: 20px;
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    transition: var(--transition-base);
}

.highlight-item:hover {
    transform: translateX(10px);
    border-color: rgba(var(--primary-rgb), 0.3);
}

.highlight-icon {
    font-size: 32px;
}

.highlight-info h3 {
    font-size: 18px;
    margin-bottom: 4px;
    color: var(--primary-400);
}

.highlight-info p {
    font-size: 15px;
    color: var(--text-tertiary);
}

/* CTA Styles */
.cta-section {
    padding: 120px 0;
    text-align: center;
}

.cta-box {
    padding: 80px 40px;
    background: radial-gradient(circle at 50% 50%, rgba(var(--primary-rgb), 0.15), transparent);
}

.cta-box h2 {
    font-size: 48px;
    margin-bottom: 24px;
}

.cta-box p {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.cta-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.cta-actions .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.secondary-contacts {
    display: flex;
    gap: 40px;
    justify-content: center;
}

.contact-link {
    color: var(--text-tertiary);
    font-weight: 500;
    transition: var(--transition-base);
    text-decoration: none;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-link:hover {
    color: var(--primary-400);
}

.contact-link i,
.cta-actions i {
    width: 20px;
    height: 20px;
}

/* Footer Styles */
.footer {
    padding: 60px 0;
    background-color: var(--bg-primary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-new-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 40px;
}

.footer-center p {
    color: var(--text-tertiary);
    font-size: 14px;
}

.footer-right .social-icons {
    display: flex;
    gap: 24px;
    justify-content: flex-end;
}

.social-icon {
    color: var(--text-tertiary);
    transition: var(--transition-base);
}

.social-icon:hover {
    color: var(--primary-400);
    transform: translateY(-3px);
}

.social-icon i {
    width: 22px;
    height: 22px;
}

/* Custom Target Cursor */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.cursor-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background-color: var(--primary-500);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px var(--primary-500);
}

.cursor-target {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 4px;
    transition: transform 0.2s ease-out;
}

.corner {
    position: absolute;
    width: 8px;
    height: 8px;
    border: 2px solid var(--primary-500);
}

.top-left {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
}

.top-right {
    top: -2px;
    right: -2px;
    border-left: none;
    border-bottom: none;
}

.bottom-left {
    bottom: -2px;
    left: -2px;
    border-right: none;
    border-top: none;
}

.bottom-right {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
}

/* Scale up on hover */
.custom-cursor.active {
    width: 60px;
    height: 60px;
}

.custom-cursor.active .cursor-target {
    border-color: rgba(var(--primary-rgb), 0.5);
    background: rgba(var(--primary-rgb), 0.05);
}

/* Hide cursor on mobile/touch */
@media (hover: none) and (pointer: coarse) {
    .custom-cursor {
        display: none;
    }

    body,
    a,
    button {
        cursor: auto;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 56px;
    }

    .sphere {
        width: 350px;
        height: 350px;
    }

    .section-title {
        text-align: center;
    }

    .about-text {
        text-align: center;
    }   
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        width: 80%;
        background: rgba(9, 9, 11, 0.95);
        backdrop-filter: blur(24px);
        flex-direction: column;
        justify-content: center;
        gap: 40px;
        transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1050;
        border-left: 1px solid rgba(var(--primary-rgb), 0.1);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-link {
        font-size: 20px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-subtitle {
        margin: 0 auto 40px;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
    }

    .sphere {
        width: 280px;
        height: 280px;
    }

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

    .hero-title {
        font-size: 40px;
    }

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

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

    .footer-new-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 24px;
    }

    .footer-right .social-icons {
        justify-content: center;
    }

    .stats-grid {
        justify-content: center;
    }

    .cta-box h2 {
        font-size: 32px;
    }
}