:root {
    /* Colors */
    --color-base: #050507;
    --color-surface: #121216;
    --color-surface-glass: rgba(18, 18, 22, 0.4);
    --color-accent-primary: #8B5CF6;
    /* Electric Violet */
    --color-accent-secondary: #06B6D4;
    /* Liquid Cyan */
    --color-text-main: #FFFFFF;
    --color-text-muted: #94A3B8;
    --color-border-subtle: rgba(255, 255, 255, 0.05);

    /* Typography */
    --font-heading: 'Syne', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Motion & Easing Curves */
    --ease-swift-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-dramatic: cubic-bezier(0.83, 0, 0.17, 1);
    --ease-hover: cubic-bezier(0.4, 0, 0.2, 1);

    /* Spacing System */
    --spacing-sm: 1rem;
    /* 16px */
    --spacing-md: 2rem;
    /* 32px */
    --spacing-lg: 5rem;
    /* 80px */
    --spacing-section: 12rem;
    /* 192px - Generous breathing room */

    /* Structural */
    --container-width: 1400px;
    --nav-height: 90px;
}

/* Base HTML setup */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    background-color: var(--color-base);
    color: var(--color-text-main);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    cursor: none;
    /* We will use a custom cursor on desktop */
}

body {
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* Layout */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

.section-spacing {
    padding: var(--spacing-section) 0;
}

.text-center {
    text-align: center;
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    background-color: white;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
    transition: width 0.3s var(--ease-hover), height 0.3s var(--ease-hover), background-color 0.3s var(--ease-hover);
    will-change: transform, width, height;
}

.custom-cursor.hover {
    width: 40px;
    height: 40px;
    background-color: transparent;
    border: 1px solid var(--color-accent-secondary);
}

/* Canvas Background (CSS Orbs) */
.canvas-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background-color: var(--color-base);
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.6;
    animation: floatOrb 15s infinite ease-in-out alternate;
}

.orb-1 {
    width: 60vw;
    height: 60vw;
    background: var(--color-accent-primary);
    top: -20vw;
    left: -10vw;
    animation-duration: 25s;
}

.orb-2 {
    width: 50vw;
    height: 50vw;
    background: var(--color-accent-secondary);
    bottom: -15vw;
    right: -10vw;
    animation-direction: alternate-reverse;
}

.orb-3 {
    width: 40vw;
    height: 40vw;
    background: #1e1433;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-duration: 20s;
}

@keyframes floatOrb {
    0% {
        transform: scale(1) translate(0, 0);
    }

    100% {
        transform: scale(1.1) translate(10vw, -10vw);
    }
}

/* Navigation */
.site-nav {
    height: var(--nav-height);
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 10px;
    /* will be 100% via GSAP or CSS */
    width: 100%;
    z-index: 100;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border-subtle);
}

.site-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    color: var(--color-text-muted);
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--color-text-main);
}

.nav-links a:not(.btn-primary)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-accent-secondary);
    transition: width 0.3s var(--ease-hover);
}

.nav-links a:not(.btn-primary):hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
}

/* Buttons */
.btn-primary {
    background: transparent;
    border: 1px solid var(--color-border-subtle);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    color: var(--color-text-main) !important;
    transition: all 0.4s var(--ease-hover);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--color-accent-primary);
    z-index: -1;
    transform: translateY(100%);
    transition: transform 0.4s var(--ease-hover);
}

.btn-primary:hover {
    border-color: var(--color-accent-primary);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover::before {
    transform: translateY(0);
}

.pill {
    border-radius: 50px;
    background: var(--color-accent-primary);
    border: none;
}

.pill::before {
    background: linear-gradient(135deg, var(--color-accent-primary) 0%, var(--color-accent-secondary) 100%);
}

.pill:hover {
    background: transparent;
    /* Allows gradient before to show fully if we want, or adjust */
}

/* Hero Section */
.hero {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding-top: var(--nav-height);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 7vw, 5.5rem);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 2rem;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
    /* For GSAP split text reveal */
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto 3rem auto;
    line-height: 1.6;
}

.hero-ctas {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
}

.text-link {
    font-weight: 500;
    border-bottom: 1px solid var(--color-border-subtle);
    padding-bottom: 4px;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.text-link:hover {
    border-color: var(--color-accent-secondary);
    color: var(--color-accent-secondary);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.scroll-indicator::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: var(--color-text-main);
    animation: scrollDown 1.5s infinite ease-in-out;
}

@keyframes scrollDown {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateY(200%);
        opacity: 0;
    }
}

/* Section Headlines */
.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 4rem;
    letter-spacing: -1px;
}

/* Selected Works */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-top: 2rem;
}

/* Stagger right column */
.projects-grid .card:nth-child(even) {
    transform: translateY(120px);
}

.glass-card {
    display: block;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--color-surface);
    border: 1px solid var(--color-border-subtle);
    aspect-ratio: 4/5;
    will-change: transform;
    transition: transform 0.6s var(--ease-swift-out), border-color 0.4s var(--ease-hover);
}

.card-image-wrap {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: transform;
    transition: transform 0.8s var(--ease-swift-out);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--color-base) 0%, transparent 60%);
    opacity: 0;
    backdrop-filter: blur(0px);
    /* Transition to 4px on hover */
    transition: opacity 0.6s var(--ease-hover), backdrop-filter 0.6s var(--ease-hover);
    display: flex;
    align-items: flex-end;
    padding: 2.5rem;
}

.card-text {
    transform: translateY(20px);
    transition: transform 0.6s var(--ease-swift-out);
}

.card-text h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.card-text .tag {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Card Hover States */
.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.glass-card:hover .card-image-wrap img {
    transform: scale(1.07);
}

.glass-card:hover .card-overlay {
    opacity: 1;
    backdrop-filter: blur(4px);
}

.glass-card:hover .card-text {
    transform: translateY(0);
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    text-align: left;
}

.service-item {
    padding: 2rem 0;
}

.service-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 2rem;
    color: var(--color-accent-secondary);
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-desc {
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* CTA Footer section */
.cta-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 6vw, 5rem);
    font-weight: 800;
    margin-bottom: 3rem;
    letter-spacing: -1px;
}

.btn-primary.large {
    font-size: 1.25rem;
    padding: 1.2rem 3rem;
}

/* About Section */
.about-content {
    max-width: 800px;
}

.about-lead {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: var(--color-text-main);
}

.about-lead strong {
    background: linear-gradient(135deg, var(--color-accent-primary), var(--color-accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-body {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    line-height: 1.8;
    margin-bottom: 3rem;
}

.about-stats {
    display: flex;
    gap: 4rem;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-accent-primary), var(--color-accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Contact Section */
.contact-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: var(--color-text-muted);
    max-width: 500px;
    margin: 0 auto 3rem auto;
    line-height: 1.6;
}

.contact-form {
    max-width: 650px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--color-surface-glass);
    border: 1px solid var(--color-border-subtle);
    border-radius: 12px;
    color: var(--color-text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-input::placeholder {
    color: var(--color-text-muted);
}

.form-input:focus {
    border-color: var(--color-accent-primary);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.15);
}

textarea.form-input {
    resize: vertical;
    min-height: 120px;
}

.contact-form .btn-primary.pill.large {
    margin-top: 0.5rem;
    align-self: center;
    cursor: pointer;
    font-family: var(--font-body);
}

/* Footer */
.site-footer {
    padding: 3rem 0;
    border-top: 1px solid var(--color-border-subtle);
    color: var(--color-text-muted);
}

.flex-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 2rem;
}

.social-links a {
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--color-accent-secondary);
}

/* Media Queries for Basics */
@media (max-width: 1024px) {
    .projects-grid {
        gap: 20px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-stats {
        gap: 2rem;
    }
}

@media (max-width: 768px) {

    html,
    body {
        cursor: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    #smooth-wrapper,
    #smooth-content {
        overflow: visible !important;
        height: auto !important;
        position: relative !important;
        transform: none !important;
        will-change: auto !important;
    }

    .canvas-background,
    .transition-overlay,
    .custom-cursor {
        display: none !important;
    }

    .site-nav {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: var(--color-base);
    }

    .hero {
        min-height: auto;
        padding-top: calc(var(--nav-height) + 3rem);
        padding-bottom: 3rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid .card:nth-child(even) {
        transform: translateY(0);
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .about-stats {
        flex-direction: column;
        gap: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
        letter-spacing: -0.5px;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        padding: 0 0.5rem;
    }

    .section-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .cta-title {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
        letter-spacing: -0.5px;
    }

    .container {
        padding: 0 1.25rem;
    }

    .section-spacing {
        padding: 5rem 0;
    }

    .btn-primary.large {
        font-size: 1rem;
        padding: 1rem 2rem;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
        background: transparent;
        border: none;
        width: 30px;
        height: 20px;
        position: relative;
        cursor: pointer;
    }

    .mobile-menu-btn span {
        position: absolute;
        width: 100%;
        height: 2px;
        background: white;
        left: 0;
        transition: all 0.3s ease;
    }

    .mobile-menu-btn span:first-child {
        top: 0;
    }

    .mobile-menu-btn span:last-child {
        bottom: 0;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .custom-cursor {
        display: none;
    }
}