/* Techeloper - WorldQuant Foundry Style with Smooth Scroll */
:root {
    --rich-carbon: #111111;
    --neural-fog: #f5f5f5;
    --off-white: #fafafa;
    --text-muted: #888888;
    --accent-coral: #e94560;
    --accent-blue: #0f3460;
    
    --font-display: 'Space Grotesk', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
    
    --easing: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}\n
html {
    font-size: 16px;
}

html.lenis, html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

body {
    font-family: var(--font-display);
    background: var(--rich-carbon);
    color: var(--neural-fog);
    line-height: 1.5;
    overflow-x: hidden;
    cursor: none;
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: var(--accent-coral);
    z-index: 10001;
    transform-origin: left;
    transform: scaleX(0);
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    width: 12px;
    height: 12px;
    background: var(--neural-fog);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
    transition: width 0.3s var(--easing), height 0.3s var(--easing);
}

.custom-cursor.hover {
    width: 48px;
    height: 48px;
    opacity: 0.5;
}

.cursor-trail {
    position: fixed;
    width: 4px;
    height: 4px;
    background: var(--accent-coral);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.5;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
}

/* Selection */
::selection {
    background: var(--accent-coral);
    color: var(--off-white);
}

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

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 0;
    transition: all 0.4s var(--easing);
    background: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header.scrolled {
    padding: 16px 0;
    background: rgba(17, 17, 17, 0.98);
}

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

.logo {
    color: var(--neural-fog);
    text-decoration: none;
    position: relative;
    z-index: 101;
    transition: transform 0.3s var(--easing);
}

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

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

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--neural-fog);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--accent-coral);
    transform: translateX(-101%);
    transition: transform 0.4s var(--easing);
}

.nav-link:hover::before {
    transform: translateX(0);
}

.nav-cta {
    border: 1px solid var(--neural-fog);
    padding: 10px 24px;
    border-radius: 4px;
    transition: all 0.4s var(--easing);
}

.nav-cta:hover {
    background: var(--neural-fog);
    color: var(--rich-carbon);
}

.nav-cta::before {
    display: none;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 101;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--neural-fog);
    transition: all 0.3s ease;
}

.menu-toggle.active span:first-child {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:last-child {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--rich-carbon);
    z-index: 99;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--neural-fog);
    text-decoration: none;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s var(--easing);
}

.mobile-menu.active .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-link:nth-child(2) { transition-delay: 0.2s; }
.mobile-link:nth-child(3) { transition-delay: 0.3s; }
.mobile-link:nth-child(4) { transition-delay: 0.4s; }

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 2;
    background: transparent;
}

.global-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1280px;
    padding: 120px 40px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
}

.hero-title {
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 600;
    line-height: 0.95;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    text-align: center;
    margin-top: auto;
    margin-bottom: auto;
}

.title-line {
    display: block;
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 0.8s var(--easing) forwards;
}

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

.hero-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
    padding-bottom: 20px;
}

.hero-subtitle {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    max-width: 300px;
}

.hero-scroll {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

/* Section Label */
.section-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-coral);
    margin-bottom: 24px;
}

/* Ethos Section */
.ethos {
    background: transparent;
    color: var(--neural-fog);
    padding: 160px 0;
    position: relative;
    z-index: 2;
    margin-top: -1px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.ethos-reveal {
    display: none;
}

.ethos-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 80px;
}

.ethos-heading {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 500;
    line-height: 1.1;
    text-transform: uppercase;
}

.ethos-body {
    max-width: 600px;
    margin-bottom: 80px;
}

.ethos-text {
    font-size: 1.125rem;
    line-height: 1.7;
    color: rgba(245, 245, 245, 0.7);
}

.ethos-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.ethos-card {
    background: rgba(255, 255, 255, 0.03);
    color: var(--neural-fog);
    padding: 32px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s var(--easing), border-color 0.4s ease;
    will-change: transform;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ethos-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-coral) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.ethos-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.ethos-card:hover::before {
    opacity: 0.1;
}

.ethos-card > * {
    position: relative;
    z-index: 1;
}

.card-number {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.card-icon {
    margin-bottom: 24px;
    color: var(--accent-coral);
    transition: transform 0.4s var(--easing);
}

.ethos-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.card-desc {
    font-size: 0.9rem;
    color: rgba(245, 245, 245, 0.6);
    line-height: 1.6;
}

/* Portfolio Section */
.portfolio {
    background: transparent;
    padding: 160px 0;
    position: relative;
    z-index: 2;
}

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

.portfolio-heading {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 500;
    line-height: 1.2;
}

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

.portfolio-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.6s var(--easing), border-color 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    will-change: transform;
}

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

.portfolio-card:hover .card-visual {
    transform: scale(1.05);
}

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

.card-visual {
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.6s var(--easing);
    overflow: hidden;
}

.card-logo {
    font-size: 3rem;
    color: var(--neural-fog);
    opacity: 0.8;
    transition: transform 0.6s var(--easing);
}

.card-content {
    padding: 24px;
}

.card-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.card-content p {
    font-size: 0.9rem;
    color: rgba(245, 245, 245, 0.6);
    margin-bottom: 16px;
}

.card-link {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--neural-fog);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease, gap 0.3s var(--easing);
    position: relative;
}

.card-link:hover {
    color: var(--accent-coral);
    gap: 12px;
}

.card-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-coral);
    transition: width 0.3s var(--easing);
}

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

/* Approach Section */
.approach {
    background: transparent;
    color: var(--neural-fog);
    padding: 160px 0;
    position: relative;
    z-index: 2;
    margin-top: -1px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.approach-reveal {
    display: none;
}

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

.approach-heading {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 600;
    line-height: 1.1;
    text-transform: uppercase;
    margin-bottom: 32px;
}

.approach-text {
    font-size: 1.125rem;
    line-height: 1.7;
    color: rgba(245, 245, 245, 0.7);
    margin-bottom: 40px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 16px 32px;
    background: var(--neural-fog);
    color: var(--rich-carbon);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--easing);
    border: none;
    cursor: pointer;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-coral);
    transform: translateX(-101%);
    transition: transform 0.4s var(--easing);
}

.btn:hover::before {
    transform: translateX(0);
}

.btn:hover {
    color: var(--neural-fog);
}

.btn > * {
    position: relative;
    z-index: 1;
}

.btn:hover .btn-dots span {
    animation-play-state: running;
}

.btn-dots {
    display: flex;
    gap: 4px;
}

.btn-dots span {
    width: 4px;
    height: 4px;
    background: currentColor;
    border-radius: 50%;
    animation: dotPulse 1.4s infinite ease-in-out both;
}

.btn-dots span:nth-child(1) { animation-delay: -0.32s; }
.btn-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes dotPulse {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.approach-stats {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.stat-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 24px;
    transition: transform 0.4s var(--easing);
}

.stat-item:hover {
    transform: translateX(10px);
}

.stat-number, .stat-prefix, .stat-suffix {
    display: inline;
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 600;
    line-height: 1;
}

.stat-suffix, .stat-prefix {
    color: var(--accent-coral);
}

.stat-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(245, 245, 245, 0.5);
    margin-top: 8px;
}

/* Contact Section */
.contact {
    background: transparent;
    padding: 160px 0;
    position: relative;
    z-index: 2;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.contact-heading {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 600;
    line-height: 1.1;
    text-transform: uppercase;
    margin-bottom: 32px;
}

.contact-text {
    font-size: 1.125rem;
    line-height: 1.7;
    color: rgba(245, 245, 245, 0.7);
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-link {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    text-decoration: none;
    color: var(--neural-fog);
    transition: all 0.4s var(--easing);
    position: relative;
    overflow: hidden;
}

.contact-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-coral);
    transform: translateX(-101%);
    transition: transform 0.4s var(--easing);
}

.contact-link:hover {
    border-color: transparent;
    transform: translateX(8px);
}

.contact-link:hover::before {
    transform: translateX(0);
}

.contact-link > * {
    position: relative;
    z-index: 1;
}

.link-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(245, 245, 245, 0.5);
    transition: color 0.3s ease;
}

.contact-link:hover .link-label {
    color: var(--neural-fog);
}

.link-value {
    font-size: 1.25rem;
    font-weight: 500;
}

/* Footer */
.footer {
    background: transparent;
    padding: 80px 0 30px;
    position: relative;
    z-index: 2;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Ensure all section content is above particles */
.container {
    position: relative;
    z-index: 3;
}

/* Section wrapper needs to be above canvas */
main#smooth-content {
    position: relative;
    z-index: 2;
}

/* Add subtle backdrop to cards for readability over particles */
.ethos-card,
.portfolio-card,
.contact-link {
    background: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(10px);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 12px;
}

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

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s var(--easing);
}

.footer-links a:hover {
    color: var(--neural-fog);
    transform: translateX(4px);
}

.footer-social {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
}

.footer-social a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--neural-fog);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    transition: all 0.4s var(--easing);
    position: relative;
    overflow: hidden;
}

.footer-social a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-coral);
    transform: scale(0);
    border-radius: 50%;
    transition: transform 0.4s var(--easing);
}

.footer-social a:hover::before {
    transform: scale(1);
}

.footer-social a:hover {
    border-color: transparent;
}

.footer-social a > span {
    position: relative;
    z-index: 1;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom p {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive */
@media (max-width: 1024px) {
    .nav {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .ethos-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .approach-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 24px;
    }
    
    .header-inner {
        padding: 0 24px;
    }
    
    .hero-content {
        padding: 100px 24px 40px;
    }
    
    .hero-bottom {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .ethos-header {
        grid-template-columns: 1fr;
    }
    
    .ethos-cards {
        grid-template-columns: 1fr;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    body {
        cursor: auto;
    }
    
    .custom-cursor,
    .cursor-trail {
        display: none;
    }
}

/* Animation classes for GSAP */
[data-reveal="up"] {
    opacity: 0;
    transform: translateY(40px);
}

[data-reveal="scale"] {
    opacity: 0;
    transform: scale(0.9);
}

[data-reveal="slide"][data-direction="left"] {
    opacity: 0;
    transform: translateX(-60px);
}

[data-reveal="slide"][data-direction="right"] {
    opacity: 0;
    transform: translateX(60px);
}

[data-reveal="counter"] .stat-number {
    opacity: 0;
}

/* Glitch Animation */
@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

/* Section transition overlays */
.section-transition {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    pointer-events: none;
    z-index: 10;
}
