:root {
    --bg: #050505;
    --bg-secondary: #0a0a0a;
    --surface: #111111;
    --border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --text-secondary: #888888;
    --accent-1: #6366f1;
    --accent-2: #ec4899;
    --accent-3: #8b5cf6;
    --gradient: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 50%, var(--accent-3) 100%);
    --font: 'Space Grotesk', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

body.loaded .hero-content,
body.loaded .hero-image,
body.loaded .hero-stats {
    opacity: 1;
    transform: translateY(0);
}

::selection {
    background: var(--accent-1);
    color: white;
}

.cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: transform 0.1s, width 0.3s, height 0.3s, background 0.3s;
    mix-blend-mode: difference;
}

.cursor.hover {
    width: 40px;
    height: 40px;
    background: var(--accent-1);
    mix-blend-mode: normal;
}

.cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, border-color 0.3s;
}

.cursor-follower.hover {
    width: 60px;
    height: 60px;
    border-color: var(--accent-1);
}

.noise {
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
    z-index: 9000;
}

.loader {
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: opacity 0.5s, visibility 0.5s;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-text {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    letter-spacing: 0.3em;
    overflow: hidden;
}

.loader-text span {
    display: inline-block;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: glitch 0.3s infinite;
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    25% { transform: translate(-2px, 2px); }
    50% { transform: translate(2px, -2px); }
    75% { transform: translate(-2px, -2px); }
}

.loader-bar {
    width: 200px;
    height: 2px;
    background: var(--border);
    margin-top: 40px;
    overflow: hidden;
    border-radius: 2px;
}

.loader-bar::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    animation: load 1.5s ease-in-out forwards;
}

@keyframes load {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 24px 60px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.header.scrolled {
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(20px);
    padding: 16px 60px;
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    color: var(--text);
    transition: transform 0.3s;
}

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

.nav {
    display: flex;
    gap: 48px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    position: relative;
    transition: color 0.3s;
}

.nav-link::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    color: var(--text);
    clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
    transition: clip-path 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover {
    color: var(--text);
}

.nav-link:hover::before {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.header-cta {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 12px #22c55e;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 140px 80px 100px;
    max-width: 1500px;
    margin: 0 auto;
    position: relative;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    transition: transform 0.3s ease-out;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-1);
    top: -200px;
    left: -100px;
    opacity: 0.2;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-2);
    bottom: -100px;
    right: -100px;
    opacity: 0.15;
}

.hero-content {
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}

.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 3px;
}

.hero-eyebrow .line {
    width: 40px;
    height: 1px;
    background: var(--gradient);
}

.hero-title {
    font-size: clamp(3.5rem, 6vw, 5.5rem);
    font-weight: 700;
    line-height: 1.05;
    margin-bottom: 32px;
}

.title-row {
    display: block;
    overflow: hidden;
}

.word {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.word.visible {
    opacity: 1;
    transform: translateY(0);
}

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

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 500px;
    margin-bottom: 40px;
}

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

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 36px;
    background: var(--gradient);
    border: none;
    border-radius: 100px;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.3);
}

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

.btn-icon {
    display: flex;
    transition: transform 0.3s;
}

.btn-primary:hover .btn-icon {
    transform: translateX(5px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 18px 36px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1) 0.5s;
}

.image-wrapper {
    position: relative;
    width: 400px;
    height: 500px;
}

.image-frame {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 200px 200px 20px 20px;
    overflow: hidden;
    z-index: 2;
}

.image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(5, 5, 5, 0.9) 100%);
}

.image-border {
    position: absolute;
    inset: -3px;
    border-radius: 203px 203px 23px 23px;
    background: var(--gradient);
    z-index: 1;
    opacity: 0.5;
}

.image-glow {
    position: absolute;
    inset: -50px;
    background: var(--gradient);
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.2;
    z-index: 0;
}

.floating-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    background: rgba(17, 17, 17, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 10;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-card.visible {
    opacity: 1;
    transform: scale(1);
}

.card-1 {
    top: 60px;
    right: -30px;
    animation: float1 6s ease-in-out infinite;
}

.card-2 {
    bottom: 120px;
    left: -40px;
    animation: float2 5s ease-in-out infinite;
}

.card-3 {
    bottom: 40px;
    right: -20px;
    animation: float3 7s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(2deg); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(-2deg); }
}

@keyframes float3 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

.card-icon {
    font-size: 1.1rem;
}

.hero-stats {
    position: absolute;
    bottom: 80px;
    left: 80px;
    display: flex;
    align-items: center;
    gap: 40px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1) 0.7s;
}

.stat {
    text-align: center;
}

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

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

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 8px;
}

.stat-divider {
    width: 1px;
    height: 50px;
    background: var(--border);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--text-secondary);
    border-radius: 12px;
    position: relative;
}

.wheel {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 8px;
    background: var(--text-secondary);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

.marquee-section {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.marquee {
    display: flex;
}

.marquee-content {
    display: flex;
    gap: 60px;
    animation: marquee 40s linear infinite;
    white-space: nowrap;
}

.marquee-content span {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 4px;
    color: var(--text-secondary);
}

.marquee-content .dot {
    color: var(--accent-1);
}

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.section-label {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-label.center {
    justify-content: center;
}

.label-num {
    color: var(--accent-1);
    font-weight: 600;
}

.label-line {
    width: 30px;
    height: 1px;
    background: var(--border);
}

.section-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
}

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

.work {
    padding: 160px 80px;
    max-width: 1400px;
    margin: 0 auto;
}

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

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

.service-card {
    padding: 50px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s;
}

.service-card.in-view {
    opacity: 1;
    transform: translateY(0);
}

.service-card:nth-child(2).in-view { transition-delay: 0.1s; }
.service-card:nth-child(3).in-view { transition-delay: 0.2s; }
.service-card:nth-child(4).in-view { transition-delay: 0.3s; }

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    display: inline-flex;
    padding: 16px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 16px;
    color: var(--accent-1);
    margin-bottom: 28px;
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 28px;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.service-tags span {
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--accent-1);
}

.about {
    padding: 160px 80px;
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 100px;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-content.in-view {
    opacity: 1;
    transform: translateY(0);
}

.about-frame {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
}

.about-frame img {
    width: 100%;
    display: block;
}

.frame-lines span {
    position: absolute;
    background: var(--gradient);
}

.frame-lines span:nth-child(1) {
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
}

.frame-lines span:nth-child(2) {
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
}

.frame-lines span:nth-child(3) {
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
}

.frame-lines span:nth-child(4) {
    top: 0;
    right: 0;
    width: 3px;
    height: 100%;
}

.about-title {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 32px;
}

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

.about-skills {
    margin-top: 48px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.skill-group h4 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.skill-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-pills span {
    padding: 10px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.skill-pills span:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent-1);
    color: var(--accent-1);
}

.contact {
    position: relative;
    padding: 180px 80px;
    overflow: hidden;
}

.contact-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.contact-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 100px 100px;
}

.contact-content {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-content.in-view {
    opacity: 1;
    transform: translateY(0);
}

.contact-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
}

.contact-desc {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 50px;
}

.contact-cta {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 24px 48px;
    background: var(--gradient);
    border-radius: 100px;
    text-decoration: none;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

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

.contact-cta:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(99, 102, 241, 0.35);
}

.contact-cta:hover::before {
    opacity: 1;
}

.cta-icon {
    display: flex;
    align-items: center;
}

.cta-text {
    position: relative;
}

.cta-arrow {
    font-size: 1.3rem;
    transition: transform 0.3s;
}

.contact-cta:hover .cta-arrow {
    transform: translateX(8px);
}

.footer {
    padding: 40px 80px;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.footer-dot {
    opacity: 0.3;
}

@media (max-width: 1200px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 140px 60px 120px;
    }
    
    .hero-content {
        order: 2;
    }
    
    .hero-image {
        order: 1;
    }
    
    .hero-desc {
        margin: 0 auto 40px;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-stats {
        position: relative;
        bottom: auto;
        left: auto;
        justify-content: center;
        margin-top: 60px;
    }
    
    .image-wrapper {
        width: 320px;
        height: 400px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .cursor, .cursor-follower {
        display: none;
    }
    
    body {
        cursor: auto;
    }
    
    .header {
        padding: 16px 24px;
    }
    
    .nav {
        display: none;
    }
    
    .hero {
        padding: 120px 24px 80px;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 30px;
    }
    
    .stat-divider {
        width: 60px;
        height: 1px;
    }
    
    .floating-card {
        display: none;
    }
    
    .work, .about, .contact {
        padding: 100px 24px;
    }
    
    .scroll-indicator {
        display: none;
    }
}
