/* Modern CSS Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    line-height: 1.6;
    text-rendering: optimizeSpeed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

input,
button,
textarea,
select {
    font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

ul,
ol {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

/* Remove default button styles */
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* Reduced motion for accessibility */
@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;
    }
}

/* Design System - CSS Custom Properties */

:root {
    /* ============================================
       COLOR PALETTE (Reference: code.html)
       ============================================ */

    /* Primary - Violet */
    --primary-main: #8B5CF6;
    /* Violet-500 */
    --primary-hover: #7C3AED;
    /* Violet-600 */
    --primary-active: #6D28D9;
    /* Violet-700 */

    /* Map to existing system */
    --primary-900: #4C1D95;
    --primary-800: #5B21B6;
    --primary-700: #6D28D9;
    --primary-600: #7C3AED;
    --primary-500: #8B5CF6;
    --primary-400: #A78BFA;
    --primary-300: #C4B5FD;
    --primary-200: #DDD6FE;
    --primary-100: #EDE9FE;

    /* Accent */
    --accent-main: #A78BFA;
    --accent-dark: #8B5CF6;
    --accent-600: #8B5CF6;
    /* Compat */

    /* Backgrounds */
    --bg-body: #F3F4F6;
    /* Gray-100 (Main Background) */
    --bg-surface: #FFFFFF;
    /* White (Cards) */
    --bg-alt: #F9FAFB;
    /* Gray-50 (Alt Sections) */
    --bg-input: #FFFFFF;

    /* Dark Sections (Hero/Footer) */
    --bg-dark-hero: #0F1115;
    --bg-dark-footer: #050608;
    --bg-card-dark: #181B21;
    --bg-dark-section: #050608;
    /* Alias for Footer/Hero bg */

    /* Text */
    --text-primary: #1F2937;
    /* Gray-800 */
    --text-secondary: #4B5563;
    /* Gray-600 */
    --text-tertiary: #9CA3AF;
    /* Gray-400 */
    --text-on-dark: #FFFFFF;
    --text-secondary-on-dark: #9CA3AF;
    /* Gray-400 */

    /* Borders */
    --border-color: #E5E7EB;
    /* Gray-200 */
    --border-color-hover: #D1D5DB;
    /* Gray-300 */
    --border-color-dark: #1F2937;
    /* Gray-800 */

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 50%, #7c3aed 100%);
    --gradient-primary: linear-gradient(90deg, #7C3AED 0%, #C084FC 100%);
    --gradient-card: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-700) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-600) 0%, var(--primary-500) 100%);

    /* Legacy Mappings (Compatibility) */
    --bg-dark: var(--bg-body);
    --bg-darker: var(--bg-alt);
    --bg-card: var(--bg-surface);
    --bg-card-hover: #F3F4F6;

    /* Glassmorphism */
    --glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    --glass-border: rgba(255, 255, 255, 0.15);

    /* Success/Warning/Error (Standard HSL for now, or match if code.html had them) */
    --success-600: hsl(150, 75%, 40%);
    --success-500: hsl(150, 70%, 50%);
    --success-400: hsl(150, 65%, 60%);
    --warning-500: hsl(35, 85%, 55%);
    --error-500: hsl(0, 75%, 55%);

    /* ============================================
       TYPOGRAPHY
       ============================================ */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;

    /* Type Scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;

    /* Font Weights */
    --font-light: 300;
    --font-regular: 400;
    --font-semibold: 600;
    --font-bold: 700;
    --font-black: 900;

    /* Line Heights */
    --leading-tight: 1.2;
    --leading-normal: 1.6;
    --leading-relaxed: 1.8;

    /* ============================================
       SPACING
       ============================================ */
    --space-1: 0.5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2rem;
    --space-5: 2.5rem;
    --space-6: 3rem;
    --space-8: 4rem;
    --space-10: 5rem;
    --space-12: 6rem;
    --space-16: 8rem;
    --space-20: 10rem;

    /* ============================================
       LAYOUT
       ============================================ */
    --container-max: 1280px;
    --container-padding: var(--space-4);
    --section-padding: var(--space-12);
    --section-padding-mobile: var(--space-8);

    /* ============================================
       BREAKPOINTS
       ============================================ */
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    --breakpoint-2xl: 1536px;

    /* ============================================
       BORDER RADIUS
       ============================================ */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* ============================================
       SHADOWS
       ============================================ */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.6);

    --glow-primary: 0 0 20px rgba(139, 92, 246, 0.5), 0 0 40px rgba(139, 92, 246, 0.3);
    --glow-accent: 0 0 20px rgba(167, 139, 250, 0.5), 0 0 40px rgba(167, 139, 250, 0.3);

    /* ============================================
       ANIMATIONS
       ============================================ */
    --duration-fast: 150ms;
    --duration-normal: 300ms;
    --duration-slow: 500ms;
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

    /* ============================================
       Z-INDEX
       ============================================ */
    --z-base: 0;
    --z-dropdown: 10;
    --z-sticky: 20;
    --z-fixed: 30;
    --z-modal-backdrop: 40;
    --z-modal: 50;
    --z-popover: 60;
    --z-tooltip: 70;
}

/* Base Styles & Typography */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;900&display=swap');

/* ============================================
   BODY & HTML
   ============================================ */

html {
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-regular);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background-color: var(--bg-dark);
    overflow-x: hidden;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    margin-bottom: var(--space-3);
    color: var(--text-primary);
}

h1 {
    font-size: var(--text-5xl);
    font-weight: var(--font-black);
}

h2 {
    font-size: var(--text-4xl);
}

h3 {
    font-size: var(--text-3xl);
}

h4 {
    font-size: var(--text-2xl);
}

h5 {
    font-size: var(--text-xl);
}

h6 {
    font-size: var(--text-lg);
}

p {
    margin-bottom: var(--space-3);
    color: var(--text-secondary);
}

a {
    color: var(--primary-400);
    transition: color var(--duration-normal) var(--ease-out);
}

a:hover {
    color: var(--primary-300);
}

strong,
b {
    font-weight: var(--font-semibold);
    color: var(--text-primary);
}

em,
i {
    font-style: italic;
}

small {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

/* Responsive Typography */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    h1 {
        font-size: var(--text-4xl);
    }

    h2 {
        font-size: var(--text-3xl);
    }

    h3 {
        font-size: var(--text-2xl);
    }
}

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

@media (max-width: 768px) {
    .container {
        padding-left: var(--space-4);
        padding-right: var(--space-4);
    }
}

.container-wide {
    max-width: 1536px;
}

.container-narrow {
    max-width: 960px;
}

/* ============================================
   SECTION
   ============================================ */

section {
    padding-top: var(--section-padding);
    padding-bottom: var(--section-padding);
    position: relative;
}

@media (max-width: 768px) {
    section {
        padding-top: var(--section-padding-mobile);
        padding-bottom: var(--section-padding-mobile);
    }
}

/* ============================================
   UTILITIES
   ============================================ */

/* Text Utilities */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-gradient {
    background: linear-gradient(to right, #C4B5FD, #FECDD3);
    /* Purple-300 to Pink-200 */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Spacing Utilities */
.mt-1 {
    margin-top: var(--space-1);
}

.mt-2 {
    margin-top: var(--space-2);
}

.mt-3 {
    margin-top: var(--space-3);
}

.mt-4 {
    margin-top: var(--space-4);
}

.mt-6 {
    margin-top: var(--space-6);
}

.mt-8 {
    margin-top: var(--space-8);
}

.mb-1 {
    margin-bottom: var(--space-1);
}

.mb-2 {
    margin-bottom: var(--space-2);
}

.mb-3 {
    margin-bottom: var(--space-3);
}

.mb-4 {
    margin-bottom: var(--space-4);
}

.mb-6 {
    margin-bottom: var(--space-6);
}

.mb-8 {
    margin-bottom: var(--space-8);
}

/* Flexbox Utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: var(--space-1);
}

.gap-2 {
    gap: var(--space-2);
}

.gap-3 {
    gap: var(--space-3);
}

.gap-4 {
    gap: var(--space-4);
}

.gap-6 {
    gap: var(--space-6);
}

/* Grid Utilities */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Visibility */
.hidden {
    display: none;
}

@media (max-width: 767px) {
    .md\:hidden {
        display: none;
    }
}

@media (min-width: 768px) {
    .mobile-only {
        display: none;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Skip to content link */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary-600);
    color: white;
    padding: var(--space-2) var(--space-4);
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* Reusable Components */

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    text-decoration: none;
    border-radius: var(--radius-lg);
    transition: all var(--duration-normal) var(--ease-out);
    cursor: pointer;
    border: 2px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-primary {
    background: var(--gradient-accent);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--glow-primary);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary-500);
}

.btn-outline {
    background: transparent;
    color: var(--primary-400);
    border-color: var(--primary-500);
}

.btn-outline:hover {
    background: var(--primary-500);
    color: white;
}

.btn-large {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-lg);
}

.btn-small {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius-full);
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--glass-border) 50%,
            transparent 100%);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-500);
}

.card-glow:hover {
    box-shadow: var(--shadow-xl), var(--glow-primary);
}

.card-solid {
    background: var(--bg-card);
    backdrop-filter: none;
    border-color: var(--border-color);
}

.card-gradient {
    background: var(--gradient-card);
    border-color: var(--primary-600);
}

/* ============================================
   PROJECT TABS
   ============================================ */

.project-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

@media (max-width: 767px) {
    .project-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: var(--space-2);
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Firefox */
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 2rem;
        /* Peek effect */
    }

    .project-tabs::-webkit-scrollbar {
        display: none;
        /* Chrome, Safari, Edge */
    }

    .project-tab {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

.project-tab {
    padding: var(--space-2) var(--space-6);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-secondary);
}

.project-tab:hover {
    border-color: var(--primary-500);
    color: var(--primary-500);
}

.project-tab.active {
    background: var(--primary-main);
    color: white;
    border-color: var(--primary-main);
}

/* ============================================
   PROJECT CARDS
   ============================================ */

.project-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--duration-normal) var(--ease-out);
    border: 1px solid var(--border-color);
    padding: var(--space-6);
}

/* Watermark icon in top-right */
.project-card::before {
    content: "";
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    width: 80px;
    height: 80px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.08;
    transition: opacity var(--duration-normal);
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-500);
}

.project-card:hover::before {
    opacity: 0.15;
}

.project-card-icon {
    width: 48px;
    height: 48px;
    background: rgba(139, 92, 246, 0.15);
    /* Primary with opacity */
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: var(--space-4);
    color: var(--primary-main);
}

.project-card:hover .project-card-icon {
    background: rgba(139, 92, 246, 0.25);
    transition: all var(--duration-normal) var(--ease-out);
}

/* Project card result checkmarks */
.project-card-results {
    margin-bottom: var(--space-4);
}

.project-card-results p {
    color: #16A34A;
    /* Green-600 */
    font-size: var(--text-xs);
    margin-bottom: var(--space-1);
    display: flex;
    align-items: flex-start;
    gap: var(--space-1);
}

.project-card-results p::before {
    content: "✔";
    flex-shrink: 0;
}

.project-card-content {
    padding: 0;
}

.project-card-title {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-3);
    color: var(--text-primary);
    white-space: nowrap;
}

.project-card-description {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
    line-height: var(--leading-relaxed);
}

.project-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.tag {
    display: inline-block;
    padding: var(--space-1) var(--space-2);
    background: rgba(59, 130, 246, 0.1);
    /* Blue-500 with opacity */
    color: #3B82F6;
    /* Blue-500 */
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.tag-accent {
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary-main);
    border-color: rgba(139, 92, 246, 0.3);
}

/* Project card tech stack */
.project-card-tech {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin-top: var(--space-3);
}

/* Project card demo link */
.project-card-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--primary-main);
    margin-top: var(--space-3);
    transition: color var(--duration-normal);
}

.project-card-link:hover {
    color: var(--primary-hover);
}

/* ============================================
   SERVICE CARDS
   ============================================ */

.service-card {
    text-align: center;
    padding: var(--space-6);
    background: var(--bg-surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    transition: all var(--duration-normal) var(--ease-out);
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-300);
}

.service-card-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-4);
    background: var(--gradient-accent);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.service-card-title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-4);
    font-weight: var(--font-bold);
    color: var(--text-primary);
}

.service-card-list {
    text-align: left;
    color: var(--text-secondary);
}

.service-card-list li {
    padding: var(--space-2) 0;
    padding-left: var(--space-5);
    position: relative;
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

.service-card-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-400);
}

/* ============================================
   STATS COUNTER
   ============================================ */

.stat-card {
    text-align: center;
    padding: var(--space-6);
}

.stat-number {
    font-size: var(--text-6xl);
    font-weight: var(--font-black);
    color: white;
    line-height: 1;
    margin-bottom: var(--space-2);
    display: block;
}

.stat-label {
    font-size: var(--text-base);
    color: white;
    opacity: 0.9;
    font-weight: var(--font-semibold);
    white-space: nowrap;
}

/* ============================================
   FORMS
   ============================================ */

.form-group {
    margin-bottom: var(--space-4);
}

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: var(--text-base);
    transition: all var(--duration-normal) var(--ease-out);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--primary-500);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-tertiary);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-error {
    color: var(--error-500);
    font-size: var(--text-sm);
    margin-top: var(--space-1);
    display: none;
}

.form-group.error .form-input,
.form-group.error .form-textarea,
.form-group.error .form-select {
    border-color: var(--error-500);
}

.form-group.error .form-error {
    display: block;
}

/* ============================================
   LANGUAGE SWITCHER
   ============================================ */

.language-switcher {
    display: flex;
    gap: var(--space-1);
    align-items: center;
    flex-shrink: 0;
}

.lang-btn {
    padding: var(--space-1) var(--space-2);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    transition: all var(--duration-normal) var(--ease-out);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.lang-btn:hover {
    color: var(--primary-400);
    background: var(--bg-card);
}

.lang-btn.active {
    color: var(--primary-400);
    border-color: var(--primary-500);
    background: var(--primary-900);
}

/* ============================================
   TECH LOGO GRID
   ============================================ */

.tech-logo {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-3);
    transition: all var(--duration-normal) var(--ease-out);
    border: 1px solid var(--border-color);
}

.tech-logo:hover {
    transform: translateY(-4px);
    border-color: var(--primary-500);
    box-shadow: var(--shadow-lg);
}

.tech-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(100%) brightness(1.5);
    transition: filter var(--duration-normal) var(--ease-out);
}

.tech-logo:hover img {
    filter: grayscale(0%) brightness(1);
}

/* ============================================
    BADGES
    ============================================ */

.badge {
    display: inline-block;
    padding: var(--space-1) var(--space-2);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-full);
}

.badge-primary {
    background: var(--primary-500);
    color: white;
}

.badge-success {
    background: var(--success-500);
    color: white;
}

.badge-outline {
    background: transparent;
    border: 1px solid var(--primary-500);
    color: var(--primary-400);
}

/* ============================================
    SOCIAL SHARING BUTTONS
    ============================================ */

.social-share {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--space-4);
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    text-decoration: none;
    border-radius: var(--radius-lg);
    transition: all var(--duration-normal) var(--ease-out);
    cursor: pointer;
    border: 2px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 120px;
}

.social-btn-twitter {
    background: #1DA1F2;
    color: white;
    border-color: #1DA1F2;
}

.social-btn-twitter:hover {
    background: #0d95e8;
    border-color: #0d95e8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(29, 161, 242, 0.3);
}

.social-btn-facebook {
    background: #1877F2;
    color: white;
    border-color: #1877F2;
}

.social-btn-facebook:hover {
    background: #166fe5;
    border-color: #166fe5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

.social-btn-linkedin {
    background: #0077B5;
    color: white;
    border-color: #0077B5;
}

.social-btn-linkedin:hover {
    background: #005885;
    border-color: #005885;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 119, 181, 0.3);
}

.social-btn-outline {
    background: transparent;
    color: var(--primary-400);
    border-color: var(--primary-500);
}

.social-btn-outline:hover {
    background: var(--primary-500);
    color: white;
}

/* ============================================
   TIMELINE (for AI Process)
   ============================================ */

.timeline-item {
    position: relative;
    padding-left: var(--space-8);
    padding-bottom: var(--space-6);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 32px;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 44px;
    height: 44px;
    background: var(--gradient-accent);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: var(--font-bold);
    border: 3px solid var(--bg-dark);
    z-index: 1;
}

.timeline-content h3 {
    margin-bottom: var(--space-2);
    font-size: var(--text-lg);
    white-space: nowrap;
}

.timeline-content p {
    margin-bottom: var(--space-2);
}

.timeline-tools {
    display: inline-block;
    padding: var(--space-1) var(--space-2);
    background: rgba(59, 130, 246, 0.15);
    /* Blue-500 with opacity */
    color: #3B82F6;
    /* Blue-500 */
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    margin-top: var(--space-2);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.timeline-effect {
    color: #16A34A;
    /* Green-600 */
    font-weight: var(--font-semibold);
    font-size: var(--text-xs);
    margin-top: var(--space-2);
    display: block;
}

/* ============================================
   COMPARISON TABLE
   ============================================ */

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.comparison-table thead {
    background: var(--gradient-card);
}

.comparison-table th {
    padding: var(--space-4);
    text-align: left;
    font-weight: var(--font-bold);
    color: var(--text-primary);
}

.comparison-table td {
    padding: var(--space-4);
    border-top: 1px solid var(--border-color);
}

.comparison-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.comparison-table strong {
    color: var(--success-400);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .comparison-table {
        font-size: var(--text-sm);
    }

    .comparison-table th,
    .comparison-table td {
        padding: var(--space-2) var(--space-3);
    }

    .service-card-title {
        font-size: var(--text-lg);
    }

    .project-card-title {
        font-size: var(--text-base);
    }

    .stat-label {
        font-size: var(--text-xs);
    }

    .timeline-content h3 {
        font-size: var(--text-base);
    }

    /* Hide social share buttons on mobile */
    .social-share {
        display: none;
    }
}

/* Section-Specific Styles */

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky);
    background: rgba(239, 246, 255, 0.95);
    /* Light blue/gray background */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: all var(--duration-normal) var(--ease-out);
    color: var(--text-primary);
}

.header.scrolled {
    background: rgba(239, 246, 255, 0.98);
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) 0;
    gap: var(--space-4);
    flex-wrap: nowrap;
    min-width: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
    flex-shrink: 0;
    min-width: 0;
    max-width: 200px;
}

.logo-image {
    height: 36px;
    width: auto;
    flex-shrink: 0;
}

.logo-text {
    font-size: var(--text-base);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: nowrap;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 0;
}

.nav-link {
    color: inherit;
    font-weight: var(--font-semibold);
    transition: color var(--duration-normal) var(--ease-out);
    white-space: nowrap;
    font-size: var(--text-xs);
    padding: var(--space-1) var(--space-2);
}

.nav-link:hover {
    color: var(--primary-400);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none !important;
    width: 44px;
    height: 44px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: currentColor;
    transition: all var(--duration-normal) var(--ease-out);
}

/* Đảm bảo nav-links luôn hiển thị trên desktop */
@media (min-width: 1100px) {
    .nav-links {
        display: flex !important;
        position: static !important;
        transform: none !important;
        opacity: 1 !important;
        pointer-events: all !important;
        flex-direction: row !important;
        background: transparent !important;
        padding: 0 !important;
        border: none !important;
    }

    .mobile-menu-btn {
        display: none !important;
    }

    .nav-link {
        font-size: var(--text-xs);
    }

    .nav-links {
        gap: var(--space-2);
    }
}

/* Adjust breakpoint để header không wrap quá sớm */
@media (max-width: 1200px) {
    .nav-link {
        font-size: var(--text-xs);
    }

    .nav-links {
        gap: var(--space-2);
    }

    .logo-text {
        font-size: var(--text-base);
    }

    .btn {
        padding: var(--space-2) var(--space-4);
        font-size: var(--text-sm);
    }
}

@media (max-width: 1024px) {
    .nav-link {
        font-size: var(--text-xs);
    }

    .nav-links {
        gap: var(--space-2);
    }
}

/* Chỉ hiện hamburger menu khi thực sự cần (màn hình nhỏ hơn) */
@media (max-width: 1099px) {
    .nav-links {
        position: fixed;
        top: 73px;
        left: 0;
        right: 0;
        background: var(--bg-surface);
        flex-direction: column;
        padding: var(--space-6);
        border-top: 1px solid var(--border-color);
        transform: translateY(-100%);
        color: var(--text-primary);
        opacity: 0;
        pointer-events: none;
        transition: all var(--duration-normal) var(--ease-out);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .mobile-menu-btn {
        display: flex !important;
    }
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
    background: var(--gradient-hero);
    padding-top: 140px;
    padding-bottom: var(--space-12);
    color: var(--text-on-dark);
}

.hero-fade-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, #F3F4F6 0%, transparent 100%);
    z-index: 10;
    pointer-events: none;
}

.hero .container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.hero-background {
    position: absolute;
    inset: 0;
    opacity: 0.3;
    overflow: hidden;
}

.hero-grid {
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: grid-move 20s linear infinite;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.hero-title {
    font-size: var(--text-6xl);
    line-height: 1.1;
    margin-bottom: var(--space-4);
    margin-left: auto;
    margin-right: auto;
    animation: fade-in-up 0.8s var(--ease-out);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    color: white;
    /* Override base h1 color */
}

@media (max-width: 1200px) {
    .hero-title {
        font-size: var(--text-5xl);
    }
}

@media (max-width: 900px) {
    .hero-title {
        font-size: var(--text-4xl);
        white-space: normal;
    }
}

.hero-subtitle {
    font-size: var(--text-xl);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-6);
    margin-left: auto;
    margin-right: auto;
    line-height: var(--leading-relaxed);
    text-align: center;
    animation: fade-in-up 0.8s var(--ease-out) 0.2s both;
}

.hero-cta {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    justify-content: center;
    animation: fade-in-up 0.8s var(--ease-out) 0.4s both;
}

.hero-stats {
    display: flex;
    gap: var(--space-8);
    margin-top: var(--space-8);
    justify-content: center;
    animation: fade-in-up 0.8s var(--ease-out) 0.6s both;
}

.hero-stat-item {
    text-align: center;
}

.hero-stat-number {
    font-size: var(--text-3xl);
    font-weight: var(--font-black);
    color: white;
    display: block;
    margin-bottom: var(--space-1);
}

.hero-stat-label {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 768px) {
    .hero {
        min-height: 80vh;
        padding-top: 120px;
        padding-bottom: var(--space-8);
    }

    .hero-title {
        font-size: var(--text-3xl);
        line-height: 1.2;
        white-space: normal;
    }

    .hero-subtitle {
        font-size: var(--text-lg);
        line-height: 1.6;
    }

    .hero-stats {
        /* Horizontal scroll carousel for mobile */
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        gap: var(--space-4) !important;
        margin-top: var(--space-6) !important;
        padding-bottom: var(--space-2) !important;
        scrollbar-width: none !important;
        margin-left: -1rem !important;
        margin-right: -1rem !important;
        padding-left: 1rem !important;
        padding-right: 2rem !important;
    }

    .hero-stats::-webkit-scrollbar {
        display: none;
    }

    .hero-stat-item {
        flex: 0 0 auto !important;
        min-width: 120px !important;
        scroll-snap-align: center !important;
        text-align: center !important;
        background: rgba(255, 255, 255, 0.1) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        border-radius: var(--radius-lg) !important;
        padding: var(--space-4) var(--space-5) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
    }

    .hero-stat-number {
        font-size: var(--text-2xl) !important;
        font-weight: 800 !important;
        line-height: 1.2 !important;
        display: block !important;
        margin-bottom: 4px !important;
        white-space: nowrap !important;
        color: white !important;
    }

    .hero-stat-label {
        font-size: var(--text-xs) !important;
        line-height: 1.3 !important;
        display: block !important;
        white-space: nowrap !important;
        color: rgba(255, 255, 255, 0.9) !important;
    }
}

/* ============================================
   AI PROCESS SECTION
   ============================================ */

.ai-process {
    background: var(--bg-body);
    /* #F3F4F6 */
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--space-12);
}

.section-title {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-4);
}

@media (max-width: 767px) {
    .section-title {
        font-size: var(--text-3xl);
    }
}

.section-description {
    font-size: var(--text-lg);
    color: var(--text-secondary);
}

.process-timeline {
    max-width: 900px;
    margin: 0 auto;
}

/* Horizontal timeline for desktop */
@media (min-width: 1024px) {
    .process-timeline {
        display: flex;
        gap: var(--space-4);
        max-width: none;
    }

    .timeline-item {
        flex: 1;
        padding-left: 0;
        padding-bottom: 0;
    }

    .timeline-item::before {
        display: none;
    }

    .timeline-icon {
        position: static;
        margin: 0 auto var(--space-4);
    }

    .timeline-content {
        text-align: center;
    }
}

/* ============================================
   PROJECTS SECTION
   ============================================ */

.projects {
    background: var(--bg-alt);
    /* #F9FAFB - gray-50 */
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-6);
}

@media (max-width: 767px) {
    .projects-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: var(--space-4);
        padding-bottom: var(--space-6);
        /* Hide scrollbar */
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        /* Scroll visual adjustment */
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 20%;
        /* Peek effect */
    }

    .projects-grid::-webkit-scrollbar {
        display: none;
    }

    .projects-grid .project-card {
        flex: 0 0 85%;
        /* Card width 85% */
        scroll-snap-align: center;
        min-height: auto;
    }
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   SERVICES SECTION
   ============================================ */

.services {
    background: var(--bg-body);
    /* #F3F4F6 */
}

.services-grid {
    position: relative;
    overflow: hidden;
}

.services-track {
    display: flex;
    gap: var(--space-6);
    transition: transform 0.5s ease-in-out;
}

.service-card {
    flex: 0 0 calc(33.333% - var(--space-4));
    min-width: calc(33.333% - var(--space-4));
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .service-card {
        flex: 0 0 calc(50% - var(--space-3));
        min-width: calc(50% - var(--space-3));
    }
}

@media (max-width: 640px) {
    .service-card {
        flex: 0 0 100%;
        min-width: 100%;
    }
}

/* ============================================
   STATS SECTION
   ============================================ */

.stats {
    background: var(--gradient-hero);
    /* Dark purple gradient */
    padding: var(--space-12) 0;
    color: var(--text-on-dark);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-6);
}

/* Stats Grid Mobile Carousel */
@media (max-width: 768px) {
    .stats-grid {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        gap: var(--space-4) !important;
        padding-bottom: var(--space-4) !important;
        scrollbar-width: none !important;
        margin-left: -1rem !important;
        margin-right: -1rem !important;
        padding-left: 1rem !important;
        padding-right: 2rem !important;
    }

    .stats-grid::-webkit-scrollbar {
        display: none;
    }

    .stat-card {
        flex: 0 0 auto !important;
        min-width: 140px !important;
        scroll-snap-align: center !important;
        background: rgba(255, 255, 255, 0.1) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        border-radius: var(--radius-xl) !important;
        padding: var(--space-5) var(--space-4) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
    }

    .stat-number {
        font-size: var(--text-4xl) !important;
    }

    .stat-label {
        font-size: var(--text-xs) !important;
        white-space: nowrap !important;
    }
}

/* ============================================
   TECH STACK SECTION
   ============================================ */

.tech-stack {
    background: var(--bg-body);
    /* #F3F4F6 */
}

.tech-category {
    margin-bottom: var(--space-8);
}

.tech-category h3 {
    margin-bottom: var(--space-4);
    color: var(--primary-400);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: var(--space-4);
}

/* ============================================
   FAQ SECTION
   ============================================ */

.faq {
    background: var(--bg-body);
    /* #F3F4F6 */
}

.faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-4);
    overflow: hidden;
    transition: all var(--duration-normal) var(--ease-out);
}

.faq-item:hover {
    border-color: var(--primary-500);
}

.faq-question {
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-icon {
    transition: transform var(--duration-normal) var(--ease-out);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--duration-normal) var(--ease-out);
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer-content {
    padding: 0 var(--space-6) var(--space-4);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

/* ============================================
   CONTACT SECTION
   ============================================ */

.contact {
    background: var(--bg-alt);
    /* #F9FAFB - gray-50 */
}

.contact-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

.contact-form {
    background: var(--bg-card);
    padding: var(--space-8);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--border-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
}

@media (min-width: 768px) {
    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: rgba(239, 246, 255, 0.95);
    /* Light blue/gray to match header */
    color: var(--text-primary);
    padding: var(--space-12) 0 var(--space-6);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
    margin-bottom: var(--space-8);
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: 2fr repeat(3, 1fr);
    }
}

/* Mobile Footer Compact Styles */
@media (max-width: 767px) {
    .footer {
        padding: var(--space-8) 0 var(--space-4);
    }

    .footer-content {
        gap: var(--space-4);
        margin-bottom: var(--space-4);
    }

    /* Company info - keep compact */
    .footer-column:first-child {
        text-align: center;
        padding-bottom: var(--space-4);
        border-bottom: 1px solid var(--border-color);
    }

    .footer-column:first-child img {
        height: 40px !important;
        margin-bottom: var(--space-2) !important;
    }

    .footer-column:first-child h4 {
        font-size: var(--text-lg);
        margin-bottom: var(--space-2);
    }

    .footer-column:first-child p {
        font-size: var(--text-xs);
        margin-bottom: var(--space-1);
        display: inline-block;
        margin-right: var(--space-2);
    }

    .footer-column:first-child p:last-child {
        display: none;
        /* Hide long description on mobile */
    }

    /* Middle columns - wrapper for 2-column layout */
    .footer-content {
        display: block !important;
    }

    /* Create a flex container for Services and Company */
    .footer-column:nth-child(2) {
        float: left;
        width: 48%;
        margin-right: 4%;
    }

    .footer-column:nth-child(3) {
        float: left;
        width: 48%;
    }

    /* Clear float after Company */
    .footer-column:nth-child(4) {
        clear: both;
    }

    .footer-column h4 {
        font-size: var(--text-sm);
        margin-bottom: var(--space-2);
        color: var(--primary-600);
    }

    .footer-links {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-1) var(--space-2);
    }

    .footer-links li {
        margin-bottom: 0;
    }

    .footer-links a {
        font-size: var(--text-xs);
        padding: var(--space-1) 0;
        white-space: nowrap;
    }

    /* Contact column - horizontal compact style */
    .footer-column:last-child {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-2);
        padding-top: var(--space-4);
        border-top: 1px solid var(--border-color);
        justify-content: center;
    }

    .footer-column:last-child h4 {
        width: 100%;
        text-align: center;
        margin-bottom: var(--space-2);
    }

    .footer-column:last-child p {
        font-size: var(--text-xs);
        margin-bottom: 0;
        background: var(--bg-card);
        padding: var(--space-2) var(--space-3);
        border-radius: var(--radius-lg);
        border: 1px solid var(--border-color);
        text-align: center;
    }

    .footer-column:last-child p strong {
        display: none;
        /* Hide labels on mobile */
    }

    .footer-column:last-child p br {
        display: none;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-2);
        text-align: center;
        padding-top: var(--space-4);
    }

    .footer-bottom p {
        font-size: var(--text-xs);
    }
}

.footer-column h4 {
    margin-bottom: var(--space-3);
    color: var(--text-primary);
    font-size: var(--text-lg);
}

.footer-column p,
.footer-column a {
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
    display: block;
}

.footer-column a:hover {
    color: var(--primary-400);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-2);
}

.social-links {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-3);
}

.social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: var(--radius-full);
    transition: all var(--duration-normal) var(--ease-out);
}

.social-link:hover {
    background: var(--primary-600);
    transform: translateY(-4px);
}

.footer-bottom {
    padding-top: var(--space-6);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-4);
}

.footer-bottom p {
    color: var(--text-tertiary);
    font-size: var(--text-sm);
    margin: 0;
}

.last-updated {
    color: var(--text-tertiary);
    font-size: var(--text-xs);
}

/* ============================================
   PROJECT CATEGORIES SECTION
   ============================================ */

.project-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
    margin-bottom: var(--space-10);
}

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    transition: all var(--duration-normal) var(--ease-out);
}

.category-card:hover {
    border-color: var(--primary-500);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.category-card-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-3);
}

.category-card-title {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-3);
    white-space: nowrap;
}

.category-card-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-card-list li {
    color: var(--text-secondary);
    padding: var(--space-1) 0;
    font-size: var(--text-sm);
    position: relative;
    padding-left: var(--space-4);
}

.category-card-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-400);
}

/* ============================================
   CASE STUDIES SECTION
   ============================================ */

.case-studies-header {
    text-align: center;
    margin-top: var(--space-12);
    margin-bottom: var(--space-8);
}

.case-studies-header h3 {
    font-size: var(--text-2xl);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.case-studies-grid {
    position: relative;
    overflow: hidden;
    margin-bottom: var(--space-8);
}

.case-studies-track {
    display: flex;
    gap: var(--space-6);
    transition: transform 0.5s ease-in-out;
}

.case-study-card {
    flex: 0 0 calc(33.333% - var(--space-4));
    min-width: calc(33.333% - var(--space-4));
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(59, 130, 246, 0.1) 100%);
    border: 1px solid var(--primary-500);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    transition: all var(--duration-normal) var(--ease-out);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .case-study-card {
        flex: 0 0 calc(50% - var(--space-3));
        min-width: calc(50% - var(--space-3));
    }
}

@media (max-width: 640px) {
    .case-study-card {
        flex: 0 0 100%;
        min-width: 100%;
    }
}

.case-study-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.2);
}

.case-study-card-icon {
    font-size: 2rem;
    margin-bottom: var(--space-3);
}

.case-study-card-title {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    line-height: var(--leading-tight);
}

.case-study-card-description {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
    line-height: var(--leading-relaxed);
}

.case-study-card-metric {
    display: inline-block;
    background: rgba(34, 197, 94, 0.1);
    /* Green-500 with opacity */
    color: #16A34A;
    /* Green-600 */
    font-weight: var(--font-semibold);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    margin-top: var(--space-2);
}

/* ============================================
   FEATURES SECTION (特徴)
   ============================================ */

.features {
    background: var(--bg-alt);
    /* #F9FAFB - gray-50 */
    padding-top: 0 !important;
    margin-top: calc(-1 * var(--space-12)) !important;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
    margin-top: calc(-1 * var(--space-4));
}

@media (max-width: 767px) {
    .features-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: var(--space-4);
        padding-bottom: var(--space-6);
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 20%;
    }

    .features-grid::-webkit-scrollbar {
        display: none;
    }

    .feature-card {
        flex: 0 0 85%;
        scroll-snap-align: center;
        min-height: auto;
    }
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    text-align: center;
    transition: all var(--duration-normal) var(--ease-out);
}

.feature-card:hover {
    border-color: var(--primary-500);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-card-icon {
    font-size: 3rem;
    margin-bottom: var(--space-4);
}

.feature-card-title {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-3);
    white-space: nowrap;
}

.feature-card-description {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

/* ============================================
   STRENGTHS SECTION (強み・特色)
   ============================================ */

.strengths {
    background: var(--gradient-hero);
    /* Dark purple gradient like hero */
    padding: var(--space-3) 0;
    color: var(--text-on-dark);
}

.strengths .section-title {
    color: white !important;
}

.strengths-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
}

@media (max-width: 767px) {
    .strengths-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: var(--space-4);
        padding-bottom: var(--space-6);
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 20%;
    }

    .strengths-grid::-webkit-scrollbar {
        display: none;
    }

    .strength-card {
        flex: 0 0 85%;
        scroll-snap-align: center;
        min-height: auto;
    }
}

@media (min-width: 768px) {
    .strengths-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.strength-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    text-align: center;
    transition: all var(--duration-normal) var(--ease-out);
}

.strength-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.02);
}

.strength-card-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-3);
}

.strength-card-title {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--text-on-dark);
    line-height: var(--leading-normal);
    white-space: nowrap;
}

@media (max-width: 768px) {

    .category-card-title,
    .feature-card-title {
        font-size: var(--text-base);
    }

    .strength-card-title,
    .case-study-card-title {
        font-size: var(--text-sm);
    }
}

/* ============================================
   FAQ MOBILE CAROUSEL OVERRIDE
   ============================================ */
@media (max-width: 768px) {
    .faq-list {
        display: flex !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        gap: var(--space-4) !important;
        padding-bottom: var(--space-6) !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch !important;
        margin-left: -1rem !important;
        margin-right: -1rem !important;
        padding-left: 1rem !important;
        padding-right: 20% !important;
    }

    .faq-list::-webkit-scrollbar {
        display: none !important;
    }

    .faq-item {
        flex: 0 0 85% !important;
        min-width: 0 !important;
        scroll-snap-align: center !important;
        height: auto !important;
    }
}

/* Animations & Transitions */

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scale-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes grid-move {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(50px);
    }
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(59, 130, 246, 0.6);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s var(--ease-out),
        transform 0.6s var(--ease-out);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s var(--ease-out),
        transform 0.6s var(--ease-out);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s var(--ease-out),
        transform 0.6s var(--ease-out);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s var(--ease-out),
        transform 0.6s var(--ease-out);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delays for multiple reveal items */
.reveal:nth-child(1) {
    transition-delay: 0ms;
}

.reveal:nth-child(2) {
    transition-delay: 100ms;
}

.reveal:nth-child(3) {
    transition-delay: 200ms;
}

.reveal:nth-child(4) {
    transition-delay: 300ms;
}

.reveal:nth-child(5) {
    transition-delay: 400ms;
}

.reveal:nth-child(6) {
    transition-delay: 500ms;
}

/* ============================================
   HOVER ANIMATIONS
   ============================================ */

.hover-lift {
    transition: transform var(--duration-normal) var(--ease-out);
}

.hover-lift:hover {
    transform: translateY(-8px);
}

.hover-scale {
    transition: transform var(--duration-normal) var(--ease-out);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow {
    transition: box-shadow var(--duration-normal) var(--ease-out);
}

.hover-glow:hover {
    box-shadow: var(--glow-primary);
}

/* ============================================
   LOADING STATES
   ============================================ */

.skeleton {
    background: linear-gradient(90deg,
            var(--bg-card) 25%,
            var(--bg-card-hover) 50%,
            var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--bg-card);
    border-top-color: var(--primary-500);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
}

/* ============================================
   PARTICLE EFFECTS (CSS-only)
   ============================================ */

.particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-400);
    border-radius: var(--radius-full);
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) {
    left: 10%;
    top: 20%;
    animation-delay: 0s;
    animation-duration: 7s;
}

.particle:nth-child(2) {
    left: 30%;
    top: 40%;
    animation-delay: 1s;
    animation-duration: 8s;
}

.particle:nth-child(3) {
    left: 50%;
    top: 10%;
    animation-delay: 2s;
    animation-duration: 6s;
}

.particle:nth-child(4) {
    left: 70%;
    top: 60%;
    animation-delay: 3s;
    animation-duration: 9s;
}

.particle:nth-child(5) {
    left: 90%;
    top: 30%;
    animation-delay: 4s;
    animation-duration: 7s;
}

/* ============================================
   GRADIENT ANIMATIONS
   ============================================ */

.animated-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 10s ease infinite;
}

/* ============================================
   NUMBER COUNTER ANIMATION
   ============================================ */

.counter {
    display: inline-block;
}

.counter[data-counting="true"] {
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* ============================================
   ENTRANCE ANIMATIONS
   ============================================ */

.fade-in {
    animation: fade-in 0.6s var(--ease-out);
}

.slide-in-left {
    animation: slide-in-left 0.6s var(--ease-out);
}

.slide-in-right {
    animation: slide-in-right 0.6s var(--ease-out);
}

.scale-in {
    animation: scale-in 0.6s var(--ease-out);
}

/* ============================================
   INTERACTIVE EFFECTS
   ============================================ */

.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* GPU acceleration for animated elements */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* Only apply will-change on hover/active states */
.hover-lift:hover,
.hover-scale:hover {
    will-change: transform;
}

/* Remove will-change after animation completes */
.reveal.active {
    will-change: auto;
}

/* ============================================
   ACCESSIBILITY - REDUCED MOTION
   ============================================ */

@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;
    }

    .particle,
    .animated-gradient,
    .hero-grid {
        animation: none !important;
    }

    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ============================================
   PAGE TRANSITION
   ============================================ */

.page-transition {
    opacity: 0;
    animation: fade-in 0.5s var(--ease-out) forwards;
}

/* ============================================
   SMOOTH SCROLLING
   ============================================ */

html {
    scroll-behavior: smooth;
}

/* Prevent scroll-behavior in JS-controlled scrolling */
html.no-smooth-scroll {
    scroll-behavior: auto;
}