/* Reset & Base Variables */
:root {
    --bg-base: #050508;
    --bg-card: rgba(20, 20, 25, 0.6);
    --bg-card-hover: rgba(30, 30, 40, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(124, 58, 237, 0.3);
    
    --primary: #7c3aed;
    --primary-hover: #6d28d9;
    --secondary: #3b82f6;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

/* Preloader */
.loader-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: var(--bg-base);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader-brand {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    animation: pulse 2s infinite;
}

.loader-bar {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.loader-bar::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, transparent, #a78bfa, transparent);
    animation: loadingBar 1.5s infinite ease-in-out;
}

@keyframes loadingBar {
    0% { transform: translateX(-150%); }
    100% { transform: translateX(250%); }
}

html {
    /* scroll-behavior: smooth removed — incompatible with GSAP ScrollTrigger */
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Glow */
.bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(124,58,237,0.15) 0%, rgba(5,5,8,0) 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

.glow-top {
    top: -200px;
    right: -100px;
}

.glow-bottom {
    bottom: 20%;
    left: -200px;
    background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, rgba(5,5,8,0) 70%);
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    line-height: 1.2;
    color: var(--text-main);
}

.text-gradient {
    background: linear-gradient(135deg, #a78bfa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 8rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

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

.mt-sm { margin-top: 1rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-family: var(--font-body);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
    padding: 1rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-glow {
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.4);
}

/* Glassmorphism Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 2rem;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--border-highlight);
    background: var(--bg-card-hover);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(5, 5, 8, 0.8);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    line-height: 1;
}

.logo-tag {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-main);
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.3rem 0.6rem;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.8rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.lang-btn:hover {
    color: var(--text-main);
}

.lang-btn.active {
    color: var(--text-main);
    background: rgba(124, 58, 237, 0.2);
}

.fi {
    background-color: transparent !important;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-main);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Video Background */
.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -3;
    opacity: 0.6; /* Slight transparency to blend with background */
}

/* Overlay to ensure text readability */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(5,5,8,0.95) 0%, rgba(5,5,8,0.7) 50%, rgba(5,5,8,0.4) 100%);
    z-index: -2;
}

/* Giant Slogan Typography */
.hero-slogan-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-heading);
    font-size: 15vw;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.03); /* Extremely subtle */
    white-space: nowrap;
    z-index: -1;
    pointer-events: none;
    user-select: none;
    letter-spacing: -0.05em;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid var(--border-highlight);
    color: #a78bfa;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

/* Scroll Indicator */
.hero-scroll-indicator {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    opacity: 0.7;
    animation: pulse 2s infinite;
}

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

.mouse-icon::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--text-main);
    border-radius: 2px;
    animation: scrollWheel 2s infinite;
}

.scroll-text {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

@keyframes scrollWheel {
    0% { top: 6px; opacity: 1; }
    100% { top: 18px; opacity: 0; }
}

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

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card .card-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.feature-list li::before {
    content: "→";
    color: var(--primary);
    position: absolute;
    left: 0;
}

/* Process Timeline */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 24px;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), rgba(124,58,237,0));
}

.timeline-step {
    display: flex;
    gap: 3rem;
    margin-bottom: 4rem;
    position: relative;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--bg-base);
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--primary);
    flex-shrink: 0;
    z-index: 1;
}

.step-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
}

.step-content p {
    color: var(--text-muted);
}

.lang-divider {
    opacity: 0.3;
    color: var(--text-muted);
}

/* Full Site Horizontal Scroll (GSAP-powered) */
.horizontal-container {
    padding: 0;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

.main-horizontal-track {
    display: flex;
    height: 100vh;
    width: max-content;
    will-change: transform;
}

.horizontal-section {
    width: 100vw;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    align-items: center;
    padding: 72px 0 2rem 0; /* Account for navbar */
    flex-shrink: 0;
}

.horizontal-section > .container {
    width: 100%;
}

.vertical-section {
    padding: 8rem 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.project-card {
    display: flex;
    flex-direction: column;
}

.project-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-desc {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1; /* Pushes the tech tags and buttons down */
}

.project-tech {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.project-tech span {
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.project-link-wrapper {
    margin-top: auto;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-family: var(--font-body);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-main);
    font-size: 0.875rem;
}

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(124, 58, 237, 0.1);
    color: white;
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-photo {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1;
    object-fit: cover;
    object-position: center top;
    border-radius: 50%;
    border: 2px solid var(--primary);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    filter: grayscale(20%) contrast(110%);
    transition: var(--transition);
}

.about-photo:hover {
    filter: grayscale(0%) contrast(100%);
    transform: scale(1.02);
}

.about-content h2 {
    text-align: left;
    margin-bottom: 1.5rem;
}

.about-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.about-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stat-icon {
    font-size: 1.5rem;
}

.stat-text {
    font-weight: 600;
}

/* Contact */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info .section-title {
    text-align: left;
}

.contact-info .section-desc {
    text-align: left;
    margin-bottom: 2rem;
}

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

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.contact-link:hover {
    color: var(--primary);
}

.contact-form {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-family: var(--font-body);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    background: rgba(5, 5, 8, 0.5);
}

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

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

/* Responsive Design */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .about-grid,
    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-image-wrapper {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 5rem 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .nav-links {
        display: none; /* simple mobile menu hiding for now, would need JS toggle */
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .timeline-step {
        gap: 1.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    /* Fallback to vertical stack on mobile for the horizontal sections */
    .horizontal-container, .main-horizontal-track {
        height: auto;
        width: 100%;
        display: block; /* Disable flex row */
    }

    .horizontal-section {
        width: 100%;
        height: auto;
        padding: 5rem 0; /* Normal vertical section padding */
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}
