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

:root {
    --primary: #7547DB;
    --secondary: #9b6fff;
    --bg-dark: #030712;
    --bg-darker: #020617;
    --text-primary: #F9FAFB;
    --text-secondary: #9CA3AF;
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.02;
    z-index: 1;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMDAiIGhlaWdodD0iMzAwIj48ZmlsdGVyIGlkPSJhIj48ZmVUdXJidWxlbmNlIHR5cGU9ImZyYWN0YWxOb2lzZSIgYmFzZUZyZXF1ZW5jeT0iLjgiIG51bU9jdGF2ZXM9IjQiIHN0aXRjaFRpbGVzPSJzdGl0Y2giLz48L2ZpbHRlcj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWx0ZXI9InVybCgjYSkiIG9wYWNpdHk9IjEiLz48L3N2Zz4=');
}

.gradient-bg {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 100vh;
    background: linear-gradient(45deg, rgba(117, 71, 219, 0.1) 0%, transparent 40%),
                linear-gradient(-45deg, rgba(155, 111, 255, 0.08) 0%, transparent 50%);
    animation: drift 20s ease-in-out infinite;
    z-index: 0;
    transform: rotate(45deg);
}

@keyframes drift {
    0%, 100% { transform: translate(0, 0) rotate(45deg); }
    33% { transform: translate(-50px, -50px) rotate(50deg); }
    66% { transform: translate(50px, -100px) rotate(40deg); }
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 40px, rgba(117, 71, 219, 0.15) 40px, rgba(117, 71, 219, 0.15) 41px),
        repeating-linear-gradient(-45deg, transparent, transparent 40px, rgba(117, 71, 219, 0.15) 40px, rgba(117, 71, 219, 0.15) 41px);
    pointer-events: none;
    z-index: 1;
    opacity: 1;
}

.container {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 40px;
    position: relative;
    z-index: 10;
}

.container::before {
    content: '';
    position: absolute;
    top: 10%;
    left: -100px;
    width: 300px;
    height: 300px;
    background: linear-gradient(45deg, rgba(117, 71, 219, 0.15) 0%, transparent 70%);
    transform: rotate(45deg);
    filter: blur(60px);
    pointer-events: none;
}

.header {
    margin-bottom: 80px;
}

.logo {
    position: relative;
    z-index: 2;
}

.logo img {
    display: block;
    filter: brightness(0.95);
    opacity: 0.9;
}

.company-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(14px, 1.5vw, 18px);
    font-weight: 400;
    letter-spacing: 0.1em;
    opacity: 0;
    animation: fadeIn 0.8s ease-out 0.3s forwards;
    color: var(--text-secondary);
    margin: 0 0 16px 0;
    line-height: 1;
    text-transform: uppercase;
}

.title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 48px;
    max-width: 1200px;
}

.word {
    display: inline-block;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.word:nth-child(1) { animation-delay: 0.5s; }
.word:nth-child(2) { animation-delay: 0.6s; }
.word:nth-child(3) { animation-delay: 0.7s; }
.word:nth-child(4) { animation-delay: 0.8s; }
.word:nth-child(5) { animation-delay: 0.9s; }
.word:nth-child(6) { animation-delay: 1.0s; }
.word:nth-child(7) { animation-delay: 1.1s; }

@media (max-width: 640px) {
    .word:nth-child(1) { animation-delay: 0.3s; }
    .word:nth-child(2) { animation-delay: 0.4s; }
    .word:nth-child(3) { animation-delay: 0.5s; }
    .word:nth-child(4) { animation-delay: 0.6s; }
    .word:nth-child(5) { animation-delay: 0.7s; }
    .word:nth-child(6) { animation-delay: 0.8s; }
    .word:nth-child(7) { animation-delay: 0.9s; }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
    from {
        opacity: 0;
        transform: translateY(20px);
    }
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.gradient-text:hover {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: scale(1.05);
    filter: brightness(1.2);
}

/* Glow effect on hover */
.gradient-text::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(117, 71, 219, 0.4) 0%, transparent 70%);
    opacity: 0;
    filter: blur(20px);
    z-index: -1;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.gradient-text:hover::after {
    opacity: 1;
}

.contact {
    opacity: 0;
    animation: fadeIn 1s ease-out 1.5s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.email {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 12px 20px;
    border: 1px solid rgba(117, 71, 219, 0.4);
    border-radius: 6px;
    background: rgba(117, 71, 219, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    transform: skewX(-3deg);
    box-shadow: 
        inset 0 1px 0 0 rgba(255, 255, 255, 0.1),
        0 4px 16px rgba(117, 71, 219, 0.15);
}

.email > * {
    transform: skewX(3deg);
}

.email::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(117, 71, 219, 0.1), transparent);
    transition: left 0.5s;
    z-index: 0;
}

.email:hover::before {
    left: 100%;
}

.email:hover {
    color: var(--text-primary);
    border-color: rgba(117, 71, 219, 0.6);
    background: rgba(117, 71, 219, 0.15);
    transform: translateY(-2px) skewX(-3deg);
    box-shadow: 
        inset 0 1px 0 0 rgba(255, 255, 255, 0.15),
        0 10px 30px -10px rgba(117, 71, 219, 0.4);
}

.arrow {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.email:hover .arrow {
    transform: translateX(4px);
}

.cursor-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(117, 71, 219, 0.1) 0%, transparent 50%);
    filter: blur(100px);
    opacity: 0;
    transition: opacity 0.3s ease;
    transform: translate(-50%, -50%);
    z-index: 0;
    left: -300px;
    top: -300px;
}

body:hover .cursor-glow {
    opacity: 0.3;
}

/* Animated grid lines - exact overlay approach */
.animated-grid-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 40px, rgba(117, 71, 219, 0.15) 40px, rgba(117, 71, 219, 0.15) 41px),
        repeating-linear-gradient(-45deg, transparent, transparent 40px, rgba(117, 71, 219, 0.15) 40px, rgba(117, 71, 219, 0.15) 41px);
    mask-image: 
        linear-gradient(45deg, 
            transparent 0%, 
            black 5%, 
            black 10%, 
            transparent 15%,
            transparent 25%,
            black 30%,
            black 35%,
            transparent 40%,
            transparent 60%,
            black 65%,
            black 70%,
            transparent 75%),
        linear-gradient(-45deg,
            transparent 0%,
            black 10%,
            black 15%,
            transparent 20%,
            transparent 40%,
            black 45%,
            black 50%,
            transparent 55%,
            transparent 70%,
            black 75%,
            black 80%,
            transparent 85%);
    mask-composite: add;
    -webkit-mask-composite: source-over;
    animation: pulseMask 8s ease-in-out infinite;
}

@keyframes pulseMask {
    0%, 100% { 
        opacity: 0.3;
        filter: brightness(1);
    }
    50% { 
        opacity: 0.6;
        filter: brightness(1.2);
    }
}

/* Sections */
.section {
    padding: 80px 0;
    position: relative;
    z-index: 10;
}

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

.section-title {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 500;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 60px;
}

.team-subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 500;
}

/* Team Section */
.team-section {
    background: linear-gradient(135deg, transparent 0%, rgba(117, 71, 219, 0.02) 50%, transparent 100%);
    position: relative;
}

.team-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 48%, rgba(117, 71, 219, 0.05) 50%, transparent 52%);
    pointer-events: none;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.team-member {
    padding: 32px;
    background: linear-gradient(135deg, rgba(117, 71, 219, 0.05) 0%, rgba(117, 71, 219, 0.02) 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid transparent;
    background-clip: padding-box;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
    box-shadow: 
        inset 0 1px 0 0 rgba(255, 255, 255, 0.05),
        0 8px 32px rgba(0, 0, 0, 0.1);
    clip-path: polygon(0 30px, 30px 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%);
}

.team-member::after {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(117, 71, 219, 0.2) 50%, rgba(255, 255, 255, 0.05) 100%);
    clip-path: polygon(0 30px, 30px 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%);
    z-index: -1;
    pointer-events: none;
}

.team-member::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(117, 71, 219, 0.05) 50%, transparent 70%);
    transform: rotate(45deg) translateY(100%);
    transition: transform 0.6s ease;
}

.team-member:hover::before {
    transform: rotate(45deg) translateY(0);
}

.team-member:hover {
    transform: translateY(-4px);
    box-shadow: 
        inset 0 1px 0 0 rgba(255, 255, 255, 0.1),
        0 12px 40px rgba(117, 71, 219, 0.15);
}


.member-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    margin-bottom: 24px;
    overflow: hidden;
    position: relative;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    filter: grayscale(1) contrast(1.1) brightness(0.9);
    transition: filter 0.3s ease;
}

.member-avatar:hover img {
    filter: grayscale(0) contrast(1.2) brightness(1);
}

.member-name {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.member-role {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    margin-bottom: 16px;
}

.member-bio {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Clients Section */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.client-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    background: linear-gradient(135deg, rgba(117, 71, 219, 0.03) 0%, rgba(117, 71, 219, 0.01) 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 
        inset 0 1px 0 0 rgba(255, 255, 255, 0.03),
        0 4px 16px rgba(0, 0, 0, 0.05);
    clip-path: polygon(0 25px, 25px 0, 100% 0, 100% calc(100% - 25px), calc(100% - 25px) 100%, 0 100%);
}

.client-logo::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(117, 71, 219, 0.15) 100%);
    clip-path: polygon(0 25px, 25px 0, 100% 0, 100% calc(100% - 25px), calc(100% - 25px) 100%, 0 100%);
    z-index: -1;
    pointer-events: none;
}

.client-logo:hover {
    transform: translateY(-2px);
    box-shadow: 
        inset 0 1px 0 0 rgba(255, 255, 255, 0.05),
        0 8px 24px rgba(117, 71, 219, 0.1);
}

.logo-placeholder {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: -0.02em;
    text-align: center;
}

.client-name {
    display: block;
    font-size: 18px;
    margin-bottom: 4px;
}

.client-tagline {
    display: block;
    font-size: 12px;
    font-weight: 400;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Blog Section */
.blog-section {
    display: none;
    background: linear-gradient(-45deg, transparent 0%, rgba(117, 71, 219, 0.02) 100%);
    position: relative;
    padding-bottom: 120px; /* Adjusted to align with footer transition */
}

.blog-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(-45deg, transparent 48%, rgba(117, 71, 219, 0.03) 50%, transparent 52%);
    pointer-events: none;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
}

.blog-post {
    padding: 32px;
    background: linear-gradient(135deg, rgba(117, 71, 219, 0.05) 0%, rgba(117, 71, 219, 0.02) 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 
        inset 0 1px 0 0 rgba(255, 255, 255, 0.05),
        0 8px 32px rgba(0, 0, 0, 0.1);
    clip-path: polygon(0 30px, 30px 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%);
}

.blog-post::after {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(117, 71, 219, 0.2) 50%, rgba(255, 255, 255, 0.05) 100%);
    clip-path: polygon(0 30px, 30px 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%);
    z-index: -1;
    pointer-events: none;
}

.blog-post:hover {
    transform: translateY(-4px);
    box-shadow: 
        inset 0 1px 0 0 rgba(255, 255, 255, 0.1),
        0 12px 40px rgba(117, 71, 219, 0.15);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.post-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--text-secondary);
}

.post-tag {
    font-size: 12px;
    padding: 4px 12px;
    background: rgba(117, 71, 219, 0.1);
    color: var(--primary);
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transform: skewX(-45deg);
    display: inline-block;
}

.post-tag span {
    display: inline-block;
    transform: skewX(45deg);
}

.post-title {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 16px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.post-excerpt {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.post-link {
    font-size: 16px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.post-link:hover {
    color: var(--secondary);
}

/* Footer */
.footer {
    padding: 60px 0;
    position: relative;
    z-index: 10;
}

/* Noise-based dark transition */
.footer::before {
    content: '';
    position: absolute;
    top: -200px;
    left: 0;
    right: 0;
    bottom: 0; /* Extend to bottom of footer */
    background: 
        linear-gradient(to bottom, rgba(2, 6, 23, 0) 0%, rgba(2, 6, 23, 0.4) 20%, rgba(2, 6, 23, 0.8) 40%, rgba(0, 0, 0, 0.95) 60%, rgba(0, 0, 0, 1) 80%, rgba(0, 0, 0, 1) 100%);
    pointer-events: none;
    z-index: -1;
}

/* Noise overlay */
.footer::after {
    content: '';
    position: absolute;
    top: -200px;
    left: 0;
    right: 0;
    bottom: 0; /* Extend to bottom of footer */
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.3'/%3E%3C/svg%3E");
    pointer-events: none;
    opacity: 0.4;
    z-index: -1;
    mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 100%);
}

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

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

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

.footer-email {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-email:hover {
    color: var(--primary);
}

@media (max-width: 640px) {
    .container {
        padding: 30px 20px;
    }
    
    .header {
        margin-bottom: 40px;
    }
    
    .logo img {
        width: 100px;
        height: 48px;
    }
    
    .company-name {
        font-size: 14px;
        margin-bottom: 12px;
        letter-spacing: 0.08em;
    }
    
    .title {
        font-size: clamp(24px, 6vw, 32px);
        margin-bottom: 32px;
        line-height: 1.3;
    }
    
    .word {
        margin-right: 0.2em;
    }
    
    .email {
        font-size: 14px;
        padding: 10px 16px;
        width: 100%;
        justify-content: center;
    }
    
    .contact {
        width: 100%;
    }
    
    .cursor-glow {
        display: none;
    }
    
    .line-animation {
        display: none;
    }
    
    .gradient-bg {
        animation: none;
        opacity: 0.8;
    }
    
    .grid-overlay {
        background-size: 30px 30px;
        opacity: 0.6;
        transform: rotate(45deg);
    }
    
    /* Mobile Sections */
    .section {
        padding: 80px 0;
    }
    
    .section-container {
        padding: 0 20px;
    }
    
    .section-title {
        font-size: clamp(28px, 8vw, 36px);
    }
    
    .section-subtitle {
        font-size: 16px;
        margin-bottom: 40px;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .team-member {
        padding: 24px;
    }
    
    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .blog-post {
        padding: 24px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}