/* ===================================
   DESIGN TOKENS
   =================================== */
:root {
    --bg-primary: #000000;
    --bg-secondary: #030303;
    --bg-tertiary: #0a0a0a;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --text-muted: #666666;
    --border-color: #181818;
    --border-hover: #333333;

    --font-mono: 'JetBrains Mono', monospace;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 6rem;

    --container-width: 900px;
}

/* ===================================
   GRAIN OVERLAY
   =================================== */
.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ===================================
   RESET & BASE
   =================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    cursor: none;
    /* Hide default cursor for custom one */
}

/* Custom Scrollbar - Minimal/Hidden */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Hide scrollbar for standard 'app-like' feel if preferred, uncomment below */
/* 
::-webkit-scrollbar {
    display: none;
}
*/

html,
body {
    width: 100%;
    overflow-x: hidden;
    /* Critical for Vercel/Mobile scrollbars */
    scroll-behavior: smooth;
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--text-secondary);
}

::selection {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* ===================================
   LAYOUT
   =================================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section {
    padding: var(--space-2xl) 0;
}

.section-dark {
    background: var(--bg-secondary);
}

/* ===================================
   NAVIGATION
   =================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: transparent;
    backdrop-filter: blur(0px);
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.nav.scrolled {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    border-bottom-color: var(--border-color);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 14px var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 500;
}

.cursor {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.nav-cta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    transition: all 0.2s ease;
}

.nav-cta:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

/* ===================================
   HERO
   =================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    height: 70%;
    background: radial-gradient(ellipse at center top, rgba(255, 255, 255, 0.025) 0%, transparent 50%);
    pointer-events: none;
}

.hero-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: var(--space-lg);
    letter-spacing: 0.05em;
}

.hero-title {
    font-size: clamp(2.2rem, 7vw, 3.5rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: var(--space-md);
    letter-spacing: -0.03em;
}

.title-gradient {
    background: linear-gradient(135deg, #ffffff 0%, #555555 60%, #ffffff 100%);
    background-size: 200% 200%;
    animation: shimmer 5s ease-in-out infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes shimmer {

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

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

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin-bottom: var(--space-xl);
    line-height: 1.65;
}

.hero-proof {
    display: flex;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.proof-item {
    display: flex;
    flex-direction: column;
}

.proof-number {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    transition: transform 0.3s ease;
}

.proof-item:hover .proof-number {
    transform: scale(1.05);
}

.proof-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 2px;
}

/* ===================================
   SECTION LABELS
   =================================== */
.section-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: var(--space-lg);
}

/* ===================================
   TESTIMONIAL
   =================================== */
.testimonial {
    max-width: 600px;
}

.testimonial-quote {
    font-size: 1.3rem;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: var(--space-md);
    font-style: italic;
    color: var(--text-primary);
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.testimonial-name {
    font-weight: 600;
    font-size: 0.9rem;
}

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

/* ===================================
   ANTI-PORTFOLIO
   =================================== */
.anti-list {
    list-style: none;
    margin-bottom: var(--space-lg);
}

.anti-list li {
    font-size: 0.95rem;
    color: var(--text-muted);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    padding-left: 20px;
}

.anti-list li::before {
    content: '×';
    position: absolute;
    left: 0;
    color: #666;
    font-weight: bold;
}

.anti-list li:last-child {
    border-bottom: none;
}

.manifesto {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    max-width: 500px;
    line-height: 1.6;
}

/* ===================================
   APPROACH SECTION
   =================================== */
.approach-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-2xl);
    align-items: start;
}

.approach-lead {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    letter-spacing: -0.01em;
}

.approach-body {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    line-height: 1.65;
}

.approach-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.stack-item {
    padding: var(--space-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.25s ease;
}

.stack-item:hover {
    border-color: var(--border-hover);
    transform: translateX(4px);
}

.stack-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
}

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

/* ===================================
   WORK LIST
   =================================== */
.work-list {
    display: flex;
    flex-direction: column;
}

.work-item {
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.work-item:first-child {
    padding-top: 0;
}

.work-item:last-child {
    border-bottom: none;
}

.work-item.reveal {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.work-item.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.work-item:hover {
    padding-left: var(--space-sm);
}

.work-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: 6px;
}

.work-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.work-type {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 3px 8px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
}

.work-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    max-width: 580px;
    line-height: 1.6;
}

.work-result {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.result-before,
.result-after {
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.result-before {
    color: var(--text-muted);
}

.result-arrow {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.result-after {
    color: var(--text-primary);
    font-weight: 500;
}

.result-tag {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-secondary);
    padding: 5px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.work-link {
    display: inline-block;
    margin-top: var(--space-sm);
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.work-link:hover {
    color: var(--text-primary);
    transform: translateX(4px);
}

/* ===================================
   CTA SECTION (Two-Column Grid)
   =================================== */
.section-cta {
    background: var(--bg-primary);
    position: relative;
}

.cta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: start;
}

.cta-left {
    padding-right: var(--space-lg);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.cta-left:hover {
    opacity: 1;
}

.cta-right {
    position: relative;
}

.cta-challenge {
    padding: var(--space-xl);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 1px transparent;
}

.cta-challenge:hover {
    border-color: var(--text-primary);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.05);
    transform: translateY(-5px);
}

.cta-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    line-height: 1.3;
    max-width: 100%;
    /* Ensure full width usage */
}

.cta-desc {
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    /* Decreased to tighten layout */
    font-size: 0.9rem;
    line-height: 1.6;
}

.cta-button {
    display: flex;
    /* Changed from inline-flex to flex for better control */
    justify-content: space-between;
    align-items: center;
    width: 100%;
    /* Full width button */
    gap: 10px;
    font-family: 'JetBrains Mono', monospace;
    /* Explicit Mono font */
    font-size: 0.8rem;
    /* Slightly smaller for fitting */
    padding: 14px 20px;
    background: var(--text-primary);
    color: var(--bg-primary);
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
    margin-bottom: var(--space-sm);
    box-sizing: border-box;
    /* Ensure padding doesn't break layout */
    white-space: nowrap;
    /* Prevent email wrap */
    overflow: hidden;
    text-overflow: ellipsis;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.08);
    color: var(--bg-primary);
}

.cta-button svg {
    transition: transform 0.2s ease;
}

.cta-button:hover svg {
    transform: translateX(4px);
}

.cta-social {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    transition: all 0.2s ease;
}

.cta-social:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
}

.cta-social svg {
    opacity: 0.6;
}

@media (max-width: 768px) {
    .cta-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .cta-left {
        padding-right: 0;
    }

    .cta-challenge {
        padding: var(--space-lg);
    }
}

/* ===================================
   FOOTER
   =================================== */
.footer {
    padding: var(--space-lg) 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

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

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-proof {
        flex-direction: column;
        gap: var(--space-md);
    }

    .approach-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .cta-button {
        font-size: 0.8rem;
        padding: 12px 18px;
    }

    .work-item:hover {
        padding-left: 0;
    }

    .work-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.hero-badge,
.hero-title,
.hero-subtitle,
.hero-proof {
    animation: fadeInUp 0.6s ease forwards;
}

.hero-title {
    animation-delay: 0.1s;
}

.hero-subtitle {
    animation-delay: 0.2s;
}

.hero-proof {
    animation-delay: 0.3s;
}

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

/* ===================================
   GLOWING BORDER ON HOVER
   =================================== */
.stack-item {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.stack-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    padding: 1px;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stack-item:hover::before {
    opacity: 1;
}

/* ===================================
   WORK ITEM 3D EFFECTS
   =================================== */
.work-item {
    transform-style: preserve-3d;
    will-change: transform;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.work-item.reveal {
    opacity: 0;
    transform: translateY(20px);
    will-change: opacity, transform;
}

.work-item.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================
   ANIMATED UNDERLINE ON LINKS
   =================================== */
.work-link {
    position: relative;
    display: inline-block;
}

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

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

/* ===================================
   PROOF NUMBER GLOW
   =================================== */
.proof-number {
    text-shadow: 0 0 30px rgba(255, 255, 255, 0);
    transition: text-shadow 0.3s ease, transform 0.3s ease;
}

.proof-item:hover .proof-number {
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

/* ===================================
   BUTTON GLOW EFFECT
   =================================== */
.cta-button {
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover::before {
    left: 100%;
}

/* ===================================
   PERFORMANCE OPTIMIZATION
   =================================== */
.grain,
.cursor-glow {
    will-change: transform;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* ===================================
   SCRAMBLE TEXT EFFECT
   =================================== */
.scramble-text {
    font-family: 'JetBrains Mono', monospace;
    /* Enforce mono during scramble for alignment */
    display: inline-block;
    min-width: 300px;
    /* Prevent layout shift */
}