/* ===================================
   MODERN PORTFOLIO - APPLE STYLE
   Created for Sebastian Contreras
   =================================== */

/* CSS Reset & Variables */
:root {
    /* Colors */
    --color-primary: #007AFF;
    --color-primary-dark: #0056CC;
    --color-secondary: #5856D6;
    --color-accent: #FF9F0A;

    /* Project Brand Colors */
    --color-brand-primary: #597fd7;
    --color-brand-light: #89cff0;
    --color-brand-dark: #0a2463;
    --color-brand-cyan: #00d9ff;
    --color-brand-purple: #b794f6;
    --color-brand-pink: #f472b6;

    --color-bg-primary: #000000;
    --color-bg-secondary: #0a0a0a;
    --color-bg-tertiary: #1a1a1a;
    --color-bg-card: rgba(255, 255, 255, 0.05);
    --color-bg-glass: rgba(255, 255, 255, 0.08);

    --color-text-primary: #ffffff;
    --color-text-secondary: rgba(255, 255, 255, 0.8);
    --color-text-tertiary: rgba(255, 255, 255, 0.6);

    --color-border: rgba(255, 255, 255, 0.1);
    --color-border-hover: rgba(255, 255, 255, 0.2);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    --font-size-6xl: 3.75rem;
    --font-size-7xl: 4.5rem;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;
    
    /* Layout */
    --container-max: 1200px;
    --container-padding: clamp(1rem, 5vw, 3rem);
    
    /* Animations */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-smooth: cubic-bezier(0.45, 0, 0.15, 1);
    --duration-fast: 0.2s;
    --duration-normal: 0.3s;
    --duration-slow: 0.5s;
    --duration-slower: 0.8s;
    --duration-slowest: 1.2s;
    
    /* Z-index layers */
    --z-background: -1;
    --z-base: 0;
    --z-content: 10;
    --z-nav: 100;
    --z-modal: 1000;
    --z-loader: 10000;
}

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

/* ===================================
   GLOBAL FILL COLOR
   Forces all SVG fills to use primary blue
   =================================== */
svg,
svg * {
    fill: var(--color-primary) !important;
}

/* Any element with a fill attribute (except explicit 'none') */
[fill]:not([fill="none"]) {
    fill: var(--color-primary) !important;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-text-primary);
    background: var(--color-bg-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   LOADING SCREEN - ISOLATED IMPLEMENTATION
   =================================== */

/* Ultra-isolated loader with maximum z-index and GSAP protection */
#loader {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: #000000 !important; /* Pure black background */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999 !important; /* Maximum z-index for total isolation */
    pointer-events: all !important;

    /* Isolation properties to prevent external effects */
    isolation: isolate !important;
    contain: strict !important;
    transform: none !important;
    will-change: opacity !important;

    /* Transition for fade out */
    transition: opacity 0.5s ease-out !important;
}

/* Prevent any transforms on loader elements */
#loader[data-no-gsap="true"],
#loader.no-animation {
    transform: none !important;
    animation: none !important;
}

.loader-inner {
    text-align: center !important;
    position: relative !important;
    z-index: 100000 !important;

    /* Ensure no external transforms affect this */
    transform: none !important;
    isolation: isolate !important;
}

/* Pure CSS spinner with only rotation animation */
.loader-spinner {
    width: 48px !important;
    height: 48px !important;
    margin: 0 auto 20px !important;
    border: 3px solid rgba(137, 207, 240, 0.2) !important; /* Light blue with transparency */
    border-top-color: #597fd7 !important; /* Primary blue */
    border-radius: 50% !important;

    /* Fixed transform origin and pure rotation animation */
    transform-origin: center center !important;
    animation: loaderSpinOnly 1s linear infinite !important;

    /* Ensure no external transforms */
    position: relative !important;
    display: block !important;
    box-sizing: border-box !important;
}

/* Ultra-simple rotation-only keyframes */
@keyframes loaderSpinOnly {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loader-text {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
}

/* Hide state for loader */
#loader.hidden {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Ensure loader is not affected by reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .loader-spinner {
        /* Keep spinner animation even with reduced motion */
        animation: loaderSpinOnly 2s linear infinite !important;
    }
}

/* ===================================
   PROGRESSIVE LINE NAVIGATION
   =================================== */
.nav-menu {
    position: fixed;
    right: var(--space-8);
    top: 50%;
    transform: translateY(-50%);
    z-index: var(--z-nav);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    align-items: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-normal) var(--ease-out-expo);
    padding: var(--space-4) 0;
}

.nav-menu.visible {
    opacity: 1;
    visibility: visible;
}

/* Progress Line Background Track */
.nav-progress-line {
    position: absolute;
    right: 0;
    top: 0;
    width: 2px;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

/* Animated Progress Fill */
.nav-progress-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        var(--color-primary),
        var(--color-accent)
    );
    transform: scaleY(var(--progress, 0));
    transform-origin: top;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px rgba(0, 122, 255, 0.5);
}

/* Navigation Items (Dots + Labels) */
.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: var(--font-size-xs);
    font-weight: 500;
    padding-right: var(--space-5);
    transition: all var(--duration-fast) var(--ease-out-expo);
    z-index: 1;
}

/* Section Dot Marker */
.nav-item::before {
    content: '';
    position: absolute;
    right: -4px;
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transition: all var(--duration-fast) var(--ease-out-expo);
    z-index: 2;
}

/* Label (hidden by default, shown on hover) */
.nav-item span {
    opacity: 0;
    transform: translateX(10px);
    transition: all var(--duration-fast) var(--ease-out-expo);
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    padding: var(--space-2) var(--space-3);
    border-radius: 6px;
    white-space: nowrap;
    font-size: var(--font-size-xs);
}

/* Hover State */
.nav-item:hover::before {
    background: var(--color-primary);
    border-color: var(--color-primary);
    transform: scale(1.3);
    box-shadow: 0 0 15px rgba(0, 122, 255, 0.6);
}

.nav-item:hover span {
    opacity: 1;
    transform: translateX(0);
}

.nav-item:hover {
    color: var(--color-text-primary);
}

/* Active State */
.nav-item.active::before {
    background: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 0 15px rgba(0, 122, 255, 0.8);
    transform: scale(1.2);
}

.nav-item.active {
    color: var(--color-primary);
}

.nav-item.active span {
    opacity: 0.8;
    transform: translateX(0);
}

/* Passed State (sections already scrolled through) */
.nav-item.passed::before {
    background: rgba(0, 122, 255, 0.6);
    border-color: rgba(0, 122, 255, 0.6);
}

/* Mobile Navigation - Horizontal Line */
@media (max-width: 768px) {
    .nav-menu {
        left: 50%;
        bottom: var(--space-8);
        top: auto;
        transform: translateX(-50%);
        flex-direction: row;
        gap: var(--space-6);
        padding: 0 var(--space-4);
    }

    /* Horizontal Progress Line */
    .nav-progress-line {
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 100%;
        height: 2px;
    }

    .nav-progress-line::after {
        transform: scaleX(var(--progress, 0));
        transform-origin: left;
    }

    .nav-item {
        padding-left: 0;
        padding-top: var(--space-5);
    }

    .nav-item::before {
        left: 50%;
        top: -5px;
        transform: translateX(-50%);
    }

    .nav-item:hover::before {
        transform: translateX(-50%) scale(1.3);
    }

    .nav-item.active::before {
        transform: translateX(-50%) scale(1.2);
    }

    /* Hide labels on mobile to save space */
    .nav-item span {
        display: none;
    }
}

/* ===================================
   3D ORBITAL NAVIGATION
   =================================== */
.nav-3d-container {
    position: fixed;
    left: var(--space-8);
    top: 50%;
    transform: translateY(-50%);
    z-index: var(--z-nav);
    width: 200px;
    height: 400px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-normal) var(--ease-out-expo);
    backdrop-filter: blur(10px);
}

.nav-3d-container.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.nav-3d-container canvas {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    pointer-events: auto;
    cursor: default;
    transition: all var(--duration-normal) var(--ease-out-expo);
}

.nav-3d-container canvas:hover {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 122, 255, 0.1);
}

/* 3D Navigation Labels (fallback/accessibility) */
.nav-3d-label {
    position: absolute;
    color: var(--color-text-secondary);
    font-size: var(--font-size-xs);
    font-weight: 500;
    padding: var(--space-1) var(--space-2);
    background: rgba(0, 0, 0, 0.8);
    border-radius: 4px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-fast) var(--ease-out-expo);
    pointer-events: none;
    white-space: nowrap;
    z-index: 1;
}

.nav-3d-label.visible {
    opacity: 1;
    visibility: visible;
}

/* Performance Optimizations */
.nav-3d-container * {
    will-change: transform;
}

/* Mobile 3D Navigation */
@media (max-width: 768px) {
    .nav-3d-container {
        left: 50% !important;
        bottom: var(--space-6) !important;
        top: auto !important;
        transform: translateX(-50%) !important;
        width: min(90vw, 350px);
        height: 100px;
        max-width: 350px;
    }

    .nav-3d-container canvas {
        border-radius: 16px;
        box-shadow: 0 4px 20px rgba(0, 122, 255, 0.2);
    }
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .nav-3d-container {
        left: var(--space-6);
        width: 180px;
        height: 350px;
    }

    .nav-3d-container canvas {
        border-radius: 12px;
    }
}

/* Large Screens */
@media (min-width: 1441px) {
    .nav-3d-container {
        left: var(--space-10);
        width: 220px;
        height: 420px;
    }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .nav-3d-container {
        bottom: var(--space-4) !important;
        height: 80px;
        width: min(70vw, 400px);
    }
}

/* Fallback for non-WebGL browsers */
.no-webgl .nav-3d-container {
    display: none !important;
}

.no-webgl .nav-menu {
    display: flex !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .nav-3d-container canvas {
        border-color: rgba(255, 255, 255, 0.3);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .nav-3d-container,
    .nav-3d-container * {
        transition: none !important;
        animation: none !important;
    }
}

/* ===================================
   STARS BACKGROUND
   =================================== */
.stars-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: var(--z-background);
}

.star {
    position: absolute;
    width: 1px;
    height: 1px;
    background: rgba(255, 255, 255, 0.5);
    animation: twinkle 3s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* ===================================
   HERO SECTION
   =================================== */
.hero-section {
    position: relative;
    height: 100vh;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    overflow: hidden;
    padding: 0 var(--space-12);
    gap: var(--space-12);
    background: var(--color-bg-primary);
}

/* Left Side: Text Content */
.hero-content {
    position: relative;
    z-index: var(--z-content);
    text-align: left;
    padding: var(--space-8) 0;
}

/* Right Side: Earth Model Container */
.hero-earth-container {
    position: relative;
    width: 100%;
    max-width: 900px; /* Increased from 700px to 900px (+28% larger) */
    height: 70vh; /* Increased from 60vh to 70vh */
    max-height: 900px; /* Increased from 700px to 900px */
    min-height: 500px; /* Increased from 400px to 500px */
    min-width: 400px; /* Increased from 300px to 400px */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

/* Earth Canvas */
#earth-canvas {
    width: 100%;
    height: 100%;
    max-height: 900px; /* Increased from 700px to 900px */
    min-height: 500px; /* Increased from 400px to 500px */
    min-width: 400px; /* Increased from 300px to 400px */
    display: block;
    position: relative;
    z-index: 2;
    aspect-ratio: 1 / 1; /* Try to keep it square */
    object-fit: contain; /* Prevent distortion */
}

.earth-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background: radial-gradient(
        circle,
        rgba(89, 127, 215, 0.3) 0%,
        rgba(89, 127, 215, 0.1) 30%,
        transparent 70%
    );
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
    animation: pulse-glow 4s ease-in-out infinite;
    z-index: 1;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.9; transform: translate(-50%, -50%) scale(1.1); }
}

.hero-text {
    animation: hero-entrance var(--duration-slower) var(--ease-out-expo) both;
    animation-delay: 0.1s;
}

@keyframes hero-entrance {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Main Statement: "CRAFTING AN INTERDEPENDENT WORLD" */
.hero-main-statement {
    font-size: clamp(3.5rem, 9vw, 7rem);  /* Increased from 2.8-5.5rem to 3.5-7rem */
    font-weight: 700;
    line-height: 1.05;
    margin-bottom: 0;
    letter-spacing: -0.03em;
    color: var(--color-text-primary);
}

.statement-word {
    display: block;
    opacity: 0;
    transform: translateY(30px) rotateX(20deg);
    animation: word-entrance 0.8s var(--ease-out-expo) both;
    transform-origin: left center;
    background: linear-gradient(
        135deg,
        var(--color-text-primary) 0%,
        #597fd7 50%,
        var(--color-text-primary) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    filter: drop-shadow(0 0 10px rgba(89, 127, 215, 0.4))
            drop-shadow(0 0 20px rgba(89, 127, 215, 0.2));
    animation: word-entrance 0.8s var(--ease-out-expo) both,
               gradient-shift 8s ease-in-out infinite;
}

.statement-word:nth-child(1) { animation-delay: 0.1s; }
.statement-word:nth-child(2) { animation-delay: 0.25s; }
.statement-word:nth-child(3) { animation-delay: 0.4s; }
.statement-word:nth-child(4) { animation-delay: 0.55s; }

@keyframes word-entrance {
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0deg);
    }
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Identity Section: Name + Role */
.hero-identity {
    margin-bottom: var(--space-6);
    opacity: 0;
    animation: fade-slide-up 0.8s var(--ease-out-expo) 0.7s both;
}

.hero-name {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--color-text-primary);
    letter-spacing: -0.01em;
}

.hero-role {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: var(--color-accent);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Tagline */
.hero-tagline {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-8);
    font-weight: 400;
    line-height: 1.6;
    max-width: 500px;
    opacity: 0;
    animation: fade-slide-up 0.8s var(--ease-out-expo) 0.9s both;
}

@keyframes fade-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CTA Button */
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-8);
    background: linear-gradient(135deg, var(--color-accent), var(--color-light-accent));
    border: 2px solid transparent;
    border-radius: 50px;
    color: white;
    text-decoration: none;
    font-size: var(--font-size-base);
    font-weight: 600;
    transition: all var(--duration-normal) var(--ease-out-expo);
    box-shadow: 0 4px 20px rgba(89, 127, 215, 0.3);
    opacity: 0;
    animation: fade-slide-up 0.8s var(--ease-out-expo) 1.1s both;
    position: relative;
    overflow: hidden;
}

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

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

.hero-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(89, 127, 215, 0.5);
}

.hero-cta svg {
    transition: transform var(--duration-normal) var(--ease-out-expo);
}

.hero-cta:hover svg {
    transform: translateX(5px);
}

.scroll-indicator {
    position: absolute;
    bottom: var(--space-8);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    color: var(--color-text-tertiary);
    font-size: var(--font-size-sm);
}

.scroll-line {
    width: 2px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

/* Animated dot moving down */
.scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(
        to bottom,
        transparent,
        var(--color-primary),
        transparent
    );
    border-radius: 2px;
    animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
    0% {
        transform: translateY(-8px);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(40px);
        opacity: 0;
    }
}

/* ===================================
   HERO SECTION - RESPONSIVE
   =================================== */

/* Tablet */
@media (max-width: 1024px) {
    .hero-section {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        padding: var(--space-8) var(--space-8);
        gap: 0;  /* No gap for tight mobile layout */
        height: auto;
        min-height: 100vh;
    }

    .hero-content {
        order: 1;  /* Text first on mobile */
        padding: 0;  /* No padding for tight spacing */
        text-align: center;  /* Center text on mobile */
    }

    .hero-earth-container {
        order: 2;  /* Earth second on mobile */
        width: 100%;  /* Full width for better proportions */
        max-width: 700px;  /* Increased from 600px to 700px for tablets */
        max-height: 700px;  /* Increased to maintain square proportions */
        margin: 0 auto;  /* Center the container */
        height: 50vh;  /* Increased from 40vh for better visibility */
        min-height: 450px;  /* Increased from 350px */
    }

    .hero-main-statement {
        font-size: clamp(2.8rem, 7vw, 4.5rem);  /* Increased from 2.2-3.5rem to 2.8-4.5rem */
        margin-bottom: 0;  /* No margin for tight spacing */
    }

    .hero-name {
        font-size: clamp(1.5rem, 4vw, 2rem);
    }

    .hero-role {
        font-size: clamp(0.9rem, 2vw, 1rem);
    }

    .scroll-indicator {
        position: relative;
        order: 3;  /* Scroll indicator at the end */
        margin-top: var(--space-4);  /* Small spacing from Earth */
    }
}

/* Mobile */
@media (max-width: 768px) {
    .hero-section {
        padding: var(--space-6) var(--space-4);
        gap: 0;  /* No gap for tight mobile layout */
    }

    .hero-content {
        padding: 0;  /* No padding for tight spacing */
    }

    .hero-earth-container {
        width: 100%;  /* Full width for better proportions */
        max-width: 550px;  /* Increased from 480px to 550px for mobile */
        max-height: 550px;  /* Increased to maintain square proportions */
        margin: 0 auto;  /* Center the container */
        height: 45vh;  /* Increased from 40vh for better visibility */
        min-height: 400px;  /* Increased from 320px */
    }

    .hero-main-statement {
        font-size: clamp(2.5rem, 9vw, 3.5rem);  /* Increased from 2-2.8rem to 2.5-3.5rem */
        margin-bottom: 0;  /* No margin for tight spacing */
        text-align: center;
    }

    .statement-word {
        display: inline;
        margin-right: 0.25em;
    }

    .statement-word:nth-child(2)::after {
        content: '\A';
        white-space: pre;
    }

    .hero-identity {
        text-align: center;
        margin-bottom: var(--space-4);
    }

    .hero-name {
        font-size: clamp(1.3rem, 5vw, 1.8rem);
    }

    .hero-role {
        font-size: clamp(0.8rem, 3vw, 0.95rem);
    }

    .hero-tagline {
        text-align: center;
        margin: 0 auto var(--space-6);
        font-size: var(--font-size-base);
    }

    .hero-cta {
        display: flex;
        width: 100%;
        justify-content: center;
        padding: var(--space-3) var(--space-6);
    }

    .earth-glow {
        width: 80%;
        height: 80%;
    }

    .scroll-indicator {
        margin-top: var(--space-3);  /* Reduced spacing for mobile */
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero-main-statement {
        font-size: 2.2rem;  /* Increased from 1.8rem to 2.2rem */
    }

    .hero-earth-container {
        width: 100%;  /* Full width for better proportions */
        max-width: 480px;  /* Increased from 420px to 480px for small screens */
        max-height: 480px;  /* Increased to maintain square proportions */
        margin: 0 auto;  /* Center the container */
        height: 45vh;  /* Increased from 40vh for better visibility */
        min-height: 350px;  /* Increased from 300px */
    }

    .statement-word {
        font-size: 2.1rem;  /* Increased from 1.75rem to 2.1rem */
    }
}

/* ===================================
   ABOUT SECTION - APPLE STYLE
   =================================== */
.about-section {
    position: relative;
    height: 1000vh; /* Extended for Apple-style sequential scroll (7 scenes) */
    background: var(--color-bg-secondary);
}

.portfolio-3d-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3;
    mix-blend-mode: screen;
    z-index: -5;
    /* Isolate WebGL context from CSS 3D */
    contain: layout style paint;
    isolation: isolate;
}

.about-sticky-container {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.about-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--container-padding);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95) translateY(20px);
    transition: all var(--duration-slower) var(--ease-out-expo);
    overflow: hidden; /* Prevent any scrollbars on panels */
}

.about-panel.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
}

/* Skills panel needs top alignment because content is tall */
.about-skills-panel {
    align-items: flex-start !important;
    padding-top: var(--space-16);
}

.about-content-wrapper {
    max-width: var(--container-max);
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Prevent scrollbars */
}

/* Intro Panel Styles */
.about-intro-panel .about-content-wrapper {
    text-align: center;
    grid-template-columns: 1fr;
    gap: var(--space-8);
}

/* All panels share same wrapper styles */
.about-panel .about-content-wrapper {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
}

/* ===================================
   INTRO PANEL ANIMATIONS
   =================================== */

/* Keyframes for intro panel staggered animations */
@keyframes introImageEntry {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes introGreetingEntry {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes introNameEntry {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes introRoleEntry {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Initial state - elements hidden before animation */
.about-intro-panel .about-image-container {
    opacity: 0;
    transform: scale(0.8) translateY(30px);
}

.about-intro-panel .about-text-intro h2 {
    opacity: 0;
    transform: translateY(-20px);
}

.about-intro-panel .about-text-intro h3 {
    opacity: 0;
    transform: translateX(-30px);
}

.about-intro-panel .about-text-intro .role-text {
    opacity: 0;
    transform: translateX(30px);
}

/* Animated state - when panel becomes active */
.about-intro-panel.active .about-image-container {
    animation: introImageEntry 1s 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.about-intro-panel.active .about-text-intro h2 {
    animation: introGreetingEntry 0.8s 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.about-intro-panel.active .about-text-intro h3 {
    animation: introNameEntry 0.8s 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.about-intro-panel.active .about-text-intro .role-text {
    animation: introRoleEntry 0.8s 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Intro Panel Base Styles */
.about-image-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
}

.profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    border: 3px solid transparent;
    transition: all var(--duration-normal) var(--ease-out-expo);
}

.profile-image:hover {
    border-color: var(--color-primary);
    transform: scale(1.05);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
}



.profile-image:hover .image-glow {
    opacity: 1;
}

.about-text-intro h2 {
    font-size: var(--font-size-4xl);
    font-weight: 300;
    margin-bottom: var(--space-2);
    color: var(--color-primary);
}

.about-text-intro h3 {
    font-size: var(--font-size-3xl);
    font-weight: 500;
    margin-bottom: var(--space-4);
}

.role-text {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    font-weight: 400;
}

/* ===================================
   EDUCATION PANEL ANIMATIONS
   =================================== */

/* Keyframes for education panel */
@keyframes educationContentEntry {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes educationImageEntry {
    from {
        opacity: 0;
        transform: translateX(50px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes educationCtaEntry {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Initial state */
.about-education-panel .education-content h4 {
    opacity: 0;
    transform: translateX(-50px);
}

.about-education-panel .education-years {
    opacity: 0;
    transform: translateX(-50px);
}

.about-education-panel .education-description {
    opacity: 0;
    transform: translateX(-50px);
}

.about-education-panel .education-cta {
    opacity: 0;
    transform: translateY(20px);
}

.about-education-panel .education-image {
    opacity: 0;
    transform: translateX(50px) scale(0.8);
}

/* Animated state */
.about-education-panel.active .education-content h4 {
    animation: educationContentEntry 0.8s 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.about-education-panel.active .education-years {
    animation: educationContentEntry 0.8s 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.about-education-panel.active .education-description {
    animation: educationContentEntry 0.8s 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.about-education-panel.active .education-cta {
    animation: educationCtaEntry 0.8s 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.about-education-panel.active .education-image {
    animation: educationImageEntry 1s 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ===================================
   ACHIEVEMENTS PANEL ANIMATIONS
   =================================== */

/* Keyframes for achievements */
@keyframes achievementTitleEntry {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes achievementItemEntry {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Initial state */
.about-achievements-panel .achievements-section h3 {
    opacity: 0;
    transform: translateY(-30px);
}

.about-achievements-panel .achievement-item {
    opacity: 0;
    transform: translateX(-40px);
}

/* Animated state */
.about-achievements-panel.active .achievements-section h3 {
    animation: achievementTitleEntry 0.8s 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.about-achievements-panel.active .achievement-item:nth-child(1) {
    animation: achievementItemEntry 0.8s 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.about-achievements-panel.active .achievement-item:nth-child(2) {
    animation: achievementItemEntry 0.8s 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.about-achievements-panel.active .achievement-item:nth-child(3) {
    animation: achievementItemEntry 0.8s 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ===================================
   SKILLS PANEL ANIMATIONS
   =================================== */

/* Keyframes for skills panel */
@keyframes skillsTitleEntry {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* OLD SYSTEM keyframes - no longer used */
/*
@keyframes skillsFilterEntry {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
*/

/* Initial state */
.about-skills-panel .skills-showcase h3 {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
}

/* Ensure emoji is always visible */
.about-skills-panel .skills-showcase h3 > span:first-child {
    opacity: 1 !important;
}

/* OLD SYSTEM: Individual button animations - DISABLED to prevent width changes */
/* These animations caused the container width to change as buttons appeared one by one */
/*
.about-skills-panel .skill-filter-btn {
    opacity: 0;
    transform: translateY(-20px);
}

.about-skills-panel.active .skill-filter-btn:nth-child(1) {
    animation: skillsFilterEntry 0.6s 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.about-skills-panel.active .skill-filter-btn:nth-child(2) {
    animation: skillsFilterEntry 0.6s 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.about-skills-panel.active .skill-filter-btn:nth-child(3) {
    animation: skillsFilterEntry 0.6s 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.about-skills-panel.active .skill-filter-btn:nth-child(4) {
    animation: skillsFilterEntry 0.6s 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.about-skills-panel.active .skill-filter-btn:nth-child(5) {
    animation: skillsFilterEntry 0.6s 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.about-skills-panel.active .skill-filter-btn:nth-child(6) {
    animation: skillsFilterEntry 0.6s 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
*/

/* Animated state */
.about-skills-panel.active .skills-showcase h3 {
    animation: skillsTitleEntry 0.8s 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Details Panel Styles */
.about-description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.about-description h2 {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    margin-bottom: var(--space-6);
    letter-spacing: -0.02em;

    /* Same professional neon effect as Services title */
    color: #ffffff;
    -webkit-text-stroke: 1px rgba(89, 127, 215, 0.8);

    text-shadow:
        0 0 15px rgba(89, 127, 215, 1),
        0 0 30px rgba(89, 127, 215, 0.8),
        0 0 60px rgba(89, 127, 215, 0.6),
        0 0 90px rgba(89, 127, 215, 0.4),
        0 0 120px rgba(89, 127, 215, 0.2);

    animation: servicesGlowPulse 5s ease-in-out infinite;
}

.about-description p {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-4);
    line-height: 1.7;
    text-align: center;
}

.skills-showcase {
    margin-top: var(--space-8);
}

.skills-showcase h3 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    margin-bottom: 48px;
    line-height: 1.1;
    letter-spacing: -1.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

/* Emoji icon styling */
.skills-showcase h3 > span:first-child {
    display: inline-block;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    line-height: 1;
    filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.3));
    opacity: 1;
    visibility: visible;
}

/* Clean simple style for Technical Expertise title */
.skills-showcase h3 > span:last-child {
    color: #597fd7; /* Primary Blue from palette */
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--space-4);
}

.skill-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.03) 100%
    );
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.05),
        0 4px 12px rgba(0, 0, 0, 0.08),
        0 12px 40px rgba(10, 25, 41, 0.12),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    transition:
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        background 0.3s ease;
    opacity: 0;
    transform: scale(0.8);
    visibility: hidden;
    pointer-events: none;
    --rotate-x: 0deg;
    --rotate-y: 0deg;
    --border-angle: 0deg;
    transform-style: preserve-3d;
    contain: layout style paint;
}

/* Holographic animated border */
.skill-item::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    border-radius: 20px;
    background: conic-gradient(
        from var(--border-angle),
        transparent 0deg,
        #597fd7 45deg,
        #89cff0 90deg,
        transparent 135deg,
        transparent 225deg,
        #597fd7 270deg,
        #89cff0 315deg,
        transparent 360deg
    );
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

/* Glow backdrop effect */
.skill-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(89, 127, 215, 0.08),
        transparent 40%
    );
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
    pointer-events: none;
}

.skill-item:hover {
    background: linear-gradient(
        135deg,
        rgba(89, 127, 215, 0.12) 0%,
        rgba(137, 207, 240, 0.08) 100%
    );
    transform:
        perspective(1000px)
        rotateX(var(--rotate-x))
        rotateY(var(--rotate-y))
        translateY(-8px)
        scale(1.02);
    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.12),
        0 20px 60px rgba(89, 127, 215, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.skill-item:hover::before {
    opacity: 1;
    animation: borderRotate 4s linear infinite;
}

.skill-item:hover::after {
    opacity: 1;
}

@keyframes borderRotate {
    to {
        --border-angle: 360deg;
    }
}

@property --border-angle {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}

.skill-icon {
    position: relative;
    width: 70px;
    height: 70px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    z-index: 1;
}

/* Orbital ring animation */
.skill-icon::before {
    content: '';
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(89, 127, 215, 0.4) 90deg,
        transparent 180deg
    );
    opacity: 0;
    animation: orbitRotate 3s linear infinite paused;
    transition: opacity 0.4s ease;
}

/* Glow backdrop for logo */
.skill-icon::after {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(89, 127, 215, 0.15) 0%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.skill-item:hover .skill-icon::before {
    opacity: 1;
    animation-play-state: running;
}

.skill-item:hover .skill-icon::after {
    opacity: 1;
}

.skill-icon img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.3));
    transition:
        transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
        filter 0.4s ease;
    position: relative;
    z-index: 1;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.skill-item:hover .skill-icon img {
    transform: scale(1.15) translateY(-4px);
    filter:
        drop-shadow(0 8px 24px rgba(89, 127, 215, 0.5))
        drop-shadow(0 0 40px rgba(89, 127, 215, 0.3));
}

@keyframes orbitRotate {
    to {
        transform: rotate(360deg);
    }
}

/* 3D Skills Sphere Container */
.skill-3d-container {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.skill-3d-canvas {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 120px;
    max-height: 120px;
}

.skill-item span {
    font-size: var(--font-size-sm);
    font-weight: 500;
    text-align: center;
    position: relative;
    z-index: 1;
}

.skill-item small {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    margin-top: var(--space-1);
}

/* Philosophy Text */
.philosophy-text {
    font-style: italic;
    color: var(--color-primary) !important;
    font-size: var(--font-size-lg) !important;
    margin: var(--space-6) 0 !important;
    padding: var(--space-4);
    border-left: 3px solid var(--color-primary);
    background: rgba(0, 122, 255, 0.05);
    border-radius: 8px;
}

/* ===================================
   PURPOSE PANEL STYLES
   =================================== */

/* Remove background from purpose section */
.purpose-section {
    background: transparent !important;
    border: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    overflow: hidden !important; /* Prevent any scrollbars */
}

.about-purpose-panel .purpose-content {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    max-width: 100%;
    overflow: hidden; /* Hide all scrollbars */
}

/* ===================================
   PURPOSE PANEL ANIMATIONS
   =================================== */

/* Keyframes for staggered entry animations */
@keyframes purposeTitleEntry {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes purposeQuoteEntry {
    from {
        opacity: 0;
        transform: translateX(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes purposePillarEntry {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Initial state - elements hidden before animation */
.about-purpose-panel .purpose-section h3 {
    opacity: 0;
    transform: translateY(-30px);
}

.about-purpose-panel .purpose-quote {
    opacity: 0;
    transform: translateX(-50px) scale(0.9);
}

.about-purpose-panel .pillar-item {
    opacity: 0;
    transform: translateY(30px) scale(0.8);
}

/* Animated state - when panel becomes active */
.about-purpose-panel.active .purpose-section h3 {
    animation: purposeTitleEntry 0.8s 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.about-purpose-panel.active .purpose-quote {
    animation: purposeQuoteEntry 1s 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.about-purpose-panel.active .pillar-item:nth-child(1) {
    animation: purposePillarEntry 0.8s 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.about-purpose-panel.active .pillar-item:nth-child(2) {
    animation: purposePillarEntry 0.8s 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.about-purpose-panel.active .pillar-item:nth-child(3) {
    animation: purposePillarEntry 0.8s 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Purpose Panel Base Styles */
.purpose-quote {
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.6;
    color: #89cff0;
    border-left: 4px solid #597fd7;
    padding-left: 1.5rem;
    margin: 1.25rem 0;
    font-style: italic;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}

.purpose-description {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.purpose-description p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
}

.purpose-pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

@media (max-width: 900px) {
    .purpose-pillars {
        grid-template-columns: 1fr;
    }
}

.pillar-item {
    background: rgba(89, 127, 215, 0.05);
    border: 1px solid rgba(89, 127, 215, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

.pillar-item:hover {
    background: rgba(89, 127, 215, 0.1);
    border-color: rgba(89, 127, 215, 0.4);
    transform: translateY(-5px);
}

.pillar-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.pillar-item h4 {
    font-size: 1.2rem;
    color: #89cff0;
    margin-bottom: 0.75rem;
}

.pillar-item p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .purpose-section h3 {
        font-size: 0.95rem;
        margin-bottom: 0.6rem;
    }

    .purpose-quote {
        font-size: 0.8rem;
        padding-left: 0.65rem;
        border-left-width: 2px;
        margin: 0.5rem 0;
        line-height: 1.3;
    }

    .purpose-content {
        gap: 0.75rem;
    }

    .purpose-pillars {
        grid-template-columns: 1fr;
        gap: 0.6rem;
        margin-top: 0.5rem;
    }

    .pillar-item {
        padding: 0.7rem;
        border-radius: 6px;
    }

    .pillar-item:hover {
        transform: translateY(-1px);
    }

    .pillar-icon {
        font-size: 1.1rem;
        margin-bottom: 0.3rem;
    }

    .pillar-item h4 {
        font-size: 0.85rem;
        margin-bottom: 0.25rem;
    }

    .pillar-item p {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .purpose-description p {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    /* Enable scroll for panels on mobile to prevent content cutoff */
    .about-panel {
        overflow-y: auto;
        overflow-x: hidden;
    }
}

/* Bio Sections */
.bio-section {
    margin-top: var(--space-12);
    padding: var(--space-8);
    background: var(--color-bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    text-align: left;
}

.bio-section h3 {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    margin-bottom: var(--space-6);
    color: var(--color-primary);
}

.bio-section h4 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--space-3);
    color: var(--color-text-primary);
}

.bio-section p {
    text-align: left !important;
    margin-bottom: var(--space-4);
}

.bio-section ul {
    list-style: none;
    padding-left: var(--space-4);
}

.bio-section ul li {
    position: relative;
    padding-left: var(--space-6);
    margin-bottom: var(--space-2);
    color: var(--color-text-secondary);
    line-height: 1.6;
}

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

/* Achievements Section */
.achievement-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.achievement-item {
    padding: var(--space-6);
    background: rgba(0, 122, 255, 0.05);
    border-left: 3px solid var(--color-primary);
    border-radius: 12px;
    transition: all var(--duration-normal) var(--ease-out-expo);
}

.achievement-item:hover {
    background: rgba(0, 122, 255, 0.1);
    transform: translateX(8px);
}

/* Education Section */
.education-section {
    background: transparent !important;
    border: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
}

/* Achievements Section */
.achievements-section {
    background: transparent !important;
    border: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
}

.education-simple {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
}

.education-content {
    text-align: left;
}

.education-content h4 {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    margin-bottom: var(--space-3);
    color: var(--color-text-primary);
}

.education-content p {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-4);
    line-height: 1.7;
}

.education-description {
    margin-top: var(--space-6);
    margin-bottom: var(--space-8) !important;
}

.education-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.unam-logo-container {
    width: 100%;
    max-width: 350px;
    transition: all var(--duration-normal) var(--ease-out-expo);
}

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

.unam-logo {
    width: 100%;
    height: auto;
    display: block;
    filter: brightness(1.1);
}

.education-years {
    font-size: var(--font-size-base);
    color: var(--color-text-tertiary);
    font-weight: 400;
    margin-top: var(--space-2);
    margin-bottom: var(--space-4);
}

.education-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-8);
    background: var(--color-primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: var(--font-size-base);
    font-weight: 600;
    transition: all var(--duration-normal) var(--ease-out-expo);
    box-shadow: 0 4px 20px rgba(0, 122, 255, 0.3);
}

.education-cta:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 122, 255, 0.4);
}

.education-cta svg {
    transition: transform var(--duration-fast);
}

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

.education-cta svg,
.education-cta svg * {
    fill: none !important;
    stroke: currentColor;
}

/* Project Highlight Section */
.project-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-4);
}

.tech-tag-small {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    background: rgba(88, 86, 214, 0.15);
    color: var(--color-secondary);
    border: 1px solid rgba(88, 86, 214, 0.3);
    border-radius: 20px;
    font-size: var(--font-size-xs);
    font-weight: 500;
    transition: all var(--duration-fast) var(--ease-out-expo);
}

.tech-tag-small:hover {
    background: rgba(88, 86, 214, 0.25);
    border-color: rgba(88, 86, 214, 0.5);
}

/* ===================================
   SKILLS FILTER SECTION
   =================================== */

/* Filter Button Container - iOS Segmented Control Style */
.skills-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 48px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: fit-content;
    min-width: 300px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Hidden state for buttons - before auto-hide animation */
/* Higher specificity to override .about-panel.active rules */
.about-panel .skills-filter-buttons.buttons-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-20px) !important;
}

/* Reveal animation for buttons */
.skills-filter-buttons.buttons-reveal {
    animation: buttonsReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes buttonsReveal {
    0% {
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

/* Ensure filter buttons and title are always visible when parent panel is active */
/* EXCEPT when buttons have .buttons-hidden class (for animation) */
.about-panel.active .skills-filter-buttons:not(.buttons-hidden),
.about-panel[style*="visibility: visible"] .skills-filter-buttons:not(.buttons-hidden),
.about-panel.active .skills-showcase h3,
.about-panel[style*="visibility: visible"] .skills-showcase h3 {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* Individual Filter Button - iOS Style */
.skill-filter-btn {
    position: relative;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition:
        color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    will-change: transform;
}

/* Animated background pill for active state */
.skill-filter-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(89, 127, 215, 0.8),
        rgba(137, 207, 240, 0.6)
    );
    border-radius: 10px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow:
        0 4px 16px rgba(89, 127, 215, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Hover State */
.skill-filter-btn:hover {
    color: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
}

/* Active State */
.skill-filter-btn.active {
    color: white;
}

.skill-filter-btn.active::after {
    opacity: 1;
}

/* Focus State (Accessibility) */
.skill-filter-btn:focus {
    outline: 2px solid rgba(89, 127, 215, 0.5);
    outline-offset: 2px;
}

/* Pressed State */
.skill-filter-btn:active {
    transform: scale(0.95);
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Unified Skills Grid - Centered */
.skills-grid-unified {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: var(--space-4);
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0;
}

/* Individual skill items have fixed width for consistent sizing */
/* Default size for auto-hide animation - smaller, compact */
.skills-grid-unified .skill-item {
    flex: 0 0 auto;
    width: 100px;
    margin: 0;
}

/* Larger size when user is actively filtering - better visibility */
.skills-grid-unified.user-filtered .skill-item {
    width: 160px;
}

/* Hidden State (filtered out) - use display none so they don't take up space */
.skill-item.hidden {
    display: none !important;
}

/* Show Animation - Staggered Entrance */
.skill-item.show {
    display: flex;
    visibility: visible;
    pointer-events: auto;
    animation: skillItemEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Hide Animation */
.skill-item.hide {
    animation: skillFadeOut 0.2s cubic-bezier(0.4, 0, 1, 1) forwards;
}

/* Improved Keyframes for smooth entrance */
@keyframes skillItemEntrance {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.85);
        visibility: visible;
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        visibility: visible;
    }
}

/* Legacy fade in for compatibility */
@keyframes skillFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes skillFadeOut {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(0.85) translateY(-15px);
        visibility: hidden;
    }
}

/* Fly to Filters Animation - Skills fly upward to filter buttons SLOWLY */
.skill-item.fly-to-filters {
    display: flex !important;
    visibility: visible !important;
    pointer-events: auto;
    animation: skillFlyToFilters 2.5s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

@keyframes skillFlyToFilters {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    20% {
        opacity: 0.95;
        transform: scale(0.98) translateY(-20px);
    }
    40% {
        opacity: 0.85;
        transform: scale(0.92) translateY(-60px);
    }
    60% {
        opacity: 0.65;
        transform: scale(0.8) translateY(-110px);
    }
    80% {
        opacity: 0.35;
        transform: scale(0.6) translateY(-160px);
    }
    100% {
        opacity: 0;
        transform: scale(0.3) translateY(-200px);
        visibility: hidden;
    }
}

/* NEW: Fly to buttons and disappear WHEN TOUCHING - ULTRA OPTIMIZED FOR 60FPS */
.skill-item.fly-to-buttons-dynamic {
    display: flex !important;
    visibility: visible !important;
    pointer-events: auto;

    /* GPU Acceleration - Force composite layer */
    will-change: transform, opacity;
    backface-visibility: hidden;
    perspective: 1000px;

    /* Isolate rendering - prevent reflows/repaints */
    contain: layout style paint;

    /* Ultra-smooth animation with native easing */
    animation: flyToButtonsAndDisappear 1s ease-out forwards;

    /* Ensure GPU rendering */
    transform: translateZ(0);
}

@keyframes flyToButtonsAndDisappear {
    /* Smooth fade during travel - invisible BEFORE reaching buttons */
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
    85% {
        /* Completely invisible BEFORE reaching destination */
        opacity: 0;
        transform: translate3d(0, calc(var(--travel-distance) * 0.9), 0) scale(0.8);
        visibility: hidden;
    }
    100% {
        /* Already invisible, just finishing movement */
        opacity: 0;
        transform: translate3d(0, var(--travel-distance), 0) scale(0.75);
        visibility: hidden;
    }
}

/* Performance Optimizations - GPU Acceleration */
.skill-item,
.skill-icon img,
.skill-filter-btn {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .skill-item,
    .skill-icon img,
    .skill-filter-btn,
    .skill-icon::before,
    .skill-icon::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }

    .skill-item:hover {
        transform: translateY(-4px) !important;
    }
}

/* Legacy Skills Category - Removed */
.skills-category {
    display: none;
}

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

.section-header {
    text-align: center;
    margin-bottom: var(--space-16);
}

.section-title {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    margin-bottom: var(--space-4);
    letter-spacing: -0.02em;
    color: #597fd7; /* Primary Blue from palette */
}

/* ===================================
   UNIFIED NEON EFFECT FOR ALL TITLES
   All sections use the same electric blue style as Services
   =================================== */

/* Note: All section titles (.section-title) inherit the base style above
   No need for section-specific overrides - unified design */

.section-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===================================
   PROJECTS SECTION - CAROUSEL
   Styles moved to carousel.css for better organization
   =================================== */

/* ===================================
   SERVICES SECTION
   =================================== */
.services-section {
    background: var(--color-bg-secondary);
    position: relative;
    overflow: hidden;
}

/* ===================================
   ENHANCED SERVICES HEADER
   =================================== */

.services-header-enhanced {
    position: relative;
    padding: 80px 20px;
    margin-bottom: 60px;
    text-align: center;
    overflow: visible;
}

/* Animated Background Elements */
.services-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Simplified static background elements - no animations */
.floating-orb {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%,
        rgba(89, 127, 215, 0.15),
        rgba(137, 207, 240, 0.08),
        transparent
    );
    opacity: 0.3;
}

.orb-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -50px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    top: 50%;
    right: -100px;
}

.orb-3 {
    width: 250px;
    height: 250px;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
}

/* Grid Pattern - static */
.grid-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(89, 127, 215, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(89, 127, 215, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.5;
}

/* Glow Effect - static */
.glow-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle,
        rgba(89, 127, 215, 0.15) 0%,
        rgba(137, 207, 240, 0.1) 30%,
        transparent 70%
    );
    opacity: 0.5;
}

/* Badge */
.services-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: rgba(89, 127, 215, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(89, 127, 215, 0.2);
    border-radius: 50px;
    margin-bottom: 32px;
    z-index: 1;
    animation: fadeInDown 0.8s ease-out;
    transition: all 0.3s ease;
}

.services-badge:hover {
    background: rgba(89, 127, 215, 0.15);
    border-color: rgba(89, 127, 215, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(89, 127, 215, 0.2);
}

.badge-icon {
    font-size: 1.2rem;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.2) rotate(10deg);
        opacity: 0.8;
    }
}

.badge-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #89cff0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Enhanced Title */
.services-title-enhanced {
    position: relative;
    z-index: 1;
    margin: 0 auto 32px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.title-line {
    display: inline-block;
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #597fd7; /* Primary Blue from palette */
}

/* Title Decoration - Professional neon effect */
.title-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    opacity: 0;
    animation: fadeIn 0.8s ease-out 0.4s both;
}

.decoration-line {
    width: 80px;
    height: 2px;
    background: rgba(89, 127, 215, 0.4);
    border-radius: 1px;
}

.decoration-dot {
    width: 8px;
    height: 8px;
    background: rgba(89, 127, 215, 0.6);
    border-radius: 50%;
}

/* Enhanced Subtitle */
.services-subtitle-enhanced {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 700px;
    margin: 0 auto 40px;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.subtitle-icon {
    font-size: 1.6rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.subtitle-text {
    line-height: 1.6;
    letter-spacing: 0.3px;
}

/* Animated Accent Line */
.services-accent-line {
    position: relative;
    width: 200px;
    height: 4px;
    margin: 0 auto;
    background: rgba(89, 127, 215, 0.1);
    border-radius: 4px;
    overflow: hidden;
    z-index: 1;
    animation: fadeIn 0.8s ease-out 0.6s both;
}

.accent-line-fill {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        #597fd7,
        #89cff0,
        transparent
    );
    animation: lineSlide 2s ease-in-out infinite;
}

@keyframes lineSlide {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Common Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .services-header-enhanced {
        padding: 60px 20px;
        margin-bottom: 40px;
        text-align: center !important;
    }

    .title-line {
        font-size: 2.5rem;
        text-align: center !important;
    }

    .services-subtitle-enhanced {
        font-size: 1.1rem;
        flex-direction: column;
        gap: 8px;
    }

    .orb-1, .orb-2, .orb-3 {
        width: 200px;
        height: 200px;
    }

    .glow-effect {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 480px) {
    .services-header-enhanced {
        padding: 40px 15px;
        text-align: center !important;
    }

    .title-line {
        font-size: 2rem;
        text-align: center !important;
    }

    .services-badge {
        padding: 8px 18px;
    }

    .badge-text {
        font-size: 0.8rem;
    }

    .services-subtitle-enhanced {
        font-size: 1rem;
    }

    .decoration-line {
        width: 40px;
    }

    .services-accent-line {
        width: 150px;
    }

    /* Achievements extra small screens */
    .achievement-list {
        gap: var(--space-3);
    }

    .achievement-item {
        padding: var(--space-3);
        border-radius: 8px;
    }

    .achievement-item h4 {
        font-size: 0.9rem;
        margin-bottom: var(--space-1);
    }

    .achievement-item p {
        font-size: 0.8rem;
        line-height: 1.5;
    }

    /* Achievements section title for small screens */
    .achievements-section h3 {
        font-size: 1.15rem;
        margin-bottom: var(--space-4);
    }

    /* Purpose extra small screens */
    .purpose-section h3 {
        font-size: 0.9rem;
        margin-bottom: 0.55rem;
    }

    .purpose-quote {
        font-size: 0.8rem;
        padding-left: 0.65rem;
        border-left-width: 2px;
        margin: 0.55rem 0;
        line-height: 1.3;
    }

    .purpose-pillars {
        gap: 0.65rem;
        margin-top: 0.55rem;
    }

    .pillar-item {
        padding: 0.75rem;
        border-radius: 6px;
    }

    .pillar-item:hover {
        transform: translateY(-1px);
    }

    .pillar-icon {
        font-size: 1.2rem;
        margin-bottom: 0.35rem;
    }

    .pillar-item h4 {
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
    }

    .pillar-item p {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .purpose-description p {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .about-purpose-panel .purpose-content {
        gap: 0.85rem;
    }

    /* Education extra small screens */
    .education-simple {
        gap: var(--space-4); /* 1rem - reduce from 2rem */
    }

    .education-content h4 {
        font-size: 1.15rem; /* reduce from 1.25rem */
        line-height: 1.3;
    }

    .education-content p {
        font-size: 0.95rem; /* reduce from 1.125rem */
        line-height: 1.6;
    }

    .education-years {
        font-size: 0.875rem; /* reduce from 1rem */
    }

    .education-description {
        margin-top: var(--space-4);
        margin-bottom: var(--space-6) !important; /* 1.5rem - reduce from 2rem */
    }

    .education-cta {
        padding: var(--space-2) var(--space-4); /* 0.5rem 1rem - more compact */
        font-size: 0.8rem; /* smaller text */
    }

    .unam-logo-container {
        max-width: 200px; /* reduce from 250px */
    }
}

/* iPhone SE and ultra-small screens (320px - 375px) */
@media (max-width: 375px) {
    /* Purpose ultra compact */
    .purpose-section h3 {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    .purpose-quote {
        font-size: 0.75rem;
        padding-left: 0.5rem;
        border-left-width: 2px;
        margin: 0.4rem 0;
        line-height: 1.25;
    }

    .purpose-pillars {
        gap: 0.5rem;
        margin-top: 0.4rem;
    }

    .pillar-item {
        padding: 0.6rem;
        border-radius: 6px;
    }

    .pillar-item:hover {
        transform: none;
    }

    .pillar-icon {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    .pillar-item h4 {
        font-size: 0.8rem;
        margin-bottom: 0.2rem;
    }

    .pillar-item p {
        font-size: 0.7rem;
        line-height: 1.25;
    }

    .purpose-description p {
        font-size: 0.75rem;
        line-height: 1.4;
    }

    .about-purpose-panel .purpose-content {
        gap: 0.6rem;
    }

    /* Achievements ultra compact */
    .achievement-list {
        gap: 0.5rem;
    }

    .achievement-item {
        padding: 0.65rem;
        border-radius: 6px;
        border-left-width: 2px;
    }

    .achievement-item:hover {
        transform: none;
    }

    .achievement-item h4 {
        font-size: 0.85rem;
        margin-bottom: 0.25rem;
        line-height: 1.3;
    }

    .achievement-item p {
        font-size: 0.75rem;
        line-height: 1.4;
    }

    /* General About section */
    .about-content-wrapper {
        gap: var(--space-6);
    }

    .bio-section {
        margin-top: var(--space-8);
    }

    .bio-section h3 {
        font-size: 1.1rem;
        margin-bottom: var(--space-3);
    }

    /* Service CTA buttons ultra compact */
    .service-cta {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    /* Hero CTA already responsive - handled in main hero section */

    /* Section container padding */
    .section-container {
        padding: var(--space-8) var(--space-4);
    }

    /* Education and other bio sections */
    .education-item,
    .timeline-item {
        padding: 0.75rem;
    }

    .education-item h4,
    .timeline-item h4 {
        font-size: 0.9rem;
    }

    .education-item p,
    .timeline-item p {
        font-size: 0.75rem;
    }

    /* Education section ultra compact */
    .education-simple {
        gap: var(--space-3); /* 0.75rem - ultra compact */
    }

    .education-content h4 {
        font-size: 1rem; /* further reduce from 1.15rem */
        line-height: 1.3;
    }

    .education-content p {
        font-size: 0.85rem; /* further reduce from 0.95rem */
        line-height: 1.5;
    }

    .education-years {
        font-size: 0.75rem; /* further reduce from 0.875rem */
    }

    .education-description {
        margin-top: var(--space-3);
        margin-bottom: var(--space-4) !important; /* 1rem - ultra compact */
    }

    .education-cta {
        padding: var(--space-2) var(--space-3); /* 0.5rem 0.75rem - ultra compact */
        font-size: 0.75rem; /* smaller text */
    }

    .unam-logo-container {
        max-width: 180px; /* further reduce from 200px */
    }

    /* Service cards ultra compact */
    .service-card {
        padding: var(--space-5);
        max-width: 100%;
    }

    .service-title {
        font-size: 1.1rem;
    }

    .service-description {
        font-size: 0.8rem;
        line-height: 1.5;
    }

    .service-features li {
        font-size: 0.75rem;
        padding: 0.25rem 0;
    }

    /* Contact form ultra compact */
    .contact-form-wrapper {
        padding: var(--space-6);
        border-radius: 20px;
    }

    .form-input {
        padding: 14px 12px;
        padding-top: 20px;
        font-size: 0.85rem;
    }

    .form-label {
        font-size: 0.75rem;
    }

    .form-submit {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    /* Skills section */
    .skill-tag {
        padding: 0.35rem 0.65rem;
        font-size: 0.75rem;
    }

    /* Projects carousel */
    .project-card {
        min-height: 140px;
    }

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

    .project-description {
        font-size: 0.75rem;
    }
}

.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: var(--space-8);
}

.service-card {
    flex: 1 1 300px;
    max-width: 400px;
    padding: var(--space-8);
    background: var(--color-bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--color-border);
    border-radius: 24px;
    transition: all var(--duration-normal) var(--ease-out-expo);
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--color-border-hover);
    transform: translateY(-4px);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-4) auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all var(--duration-normal) var(--ease-out-expo);
}

.service-icon canvas {
    display: block;
    width: 80px;
    height: 80px;
    border-radius: 8px;
}

.service-card:hover .service-icon {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(89, 127, 215, 0.3);
    box-shadow: 0 8px 32px rgba(89, 127, 215, 0.1);
    transform: translateY(-2px);
}

.service-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--space-4);
}

.service-description {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-6);
    line-height: 1.6;
}

.service-features {
    list-style: none;
}

.service-features li {
    padding: var(--space-2) 0;
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    position: relative;
    padding-left: var(--space-6);
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: bold;
}

/* Service CTA Button */
.service-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    padding: 0.875rem 1.75rem;
    background: linear-gradient(135deg, #597fd7, #89cff0);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(89, 127, 215, 0.2);
    position: relative;
    overflow: hidden;
}

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

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

.service-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(89, 127, 215, 0.35),
                0 0 20px rgba(137, 207, 240, 0.2);
}

.service-cta:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(89, 127, 215, 0.3);
}

.service-cta svg {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.service-cta .cta-text {
    position: relative;
    z-index: 1;
}

/* Responsive CTA Button */
@media (max-width: 768px) {
    .service-cta {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .service-cta {
        padding: 0.625rem 1.25rem;
        font-size: 0.85rem;
        width: 100%;
        justify-content: center;
    }
}

/* ===================================
   CONTACT SECTION
   =================================== */
.contact-section {
    background: var(--color-bg-tertiary);
    overflow-x: hidden;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-16);
    align-items: center;
}

.contact-title {
    font-size: var(--font-size-4xl);
    font-weight: 600;
    margin-bottom: var(--space-6);
    line-height: 1.2;
    color: #597fd7; /* Primary Blue from palette */
}

.contact-description {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-8);
    line-height: 1.6;
}

.contact-email {
    display: inline-block;
    font-size: var(--font-size-xl);
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: var(--space-8);
    transition: color var(--duration-fast) var(--ease-out-expo);
}

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

.social-links {
    display: flex;
    gap: var(--space-4);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--color-bg-glass);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: all var(--duration-normal) var(--ease-out-expo);
}

.social-link:hover {
    background: var(--color-bg-card);
    border-color: var(--color-border-hover);
    color: var(--color-text-primary);
    transform: translateY(-2px);
}

.contact-visual {
    width: 200px;
    height: 200px;
    position: relative;
}

.contact-decoration {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: 50%;
    opacity: 0.1;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.2;
    }
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 768px) {
    .hero-section {
        justify-content: flex-start; /* Text at top instead of center */
        padding-left: 0;
        padding-top: calc(var(--space-16) + 20px); /* More space from top for text */
        flex-direction: column; /* Stack elements vertically */
    }

    /* Hero section already fully responsive - see HERO SECTION - RESPONSIVE */

    .about-content-wrapper {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    /* Force center alignment for section headers and titles on mobile */
    .section-header {
        text-align: center !important;
    }

    .section-title {
        text-align: center !important;
    }

    .section-subtitle {
        text-align: center !important;
    }

    /* Achievements responsive */
    .achievement-list {
        gap: 0.75rem;
    }

    .achievement-item {
        padding: 0.85rem;
        border-left-width: 2px;
    }

    .achievement-item h4 {
        font-size: 0.95rem;
        margin-bottom: 0.4rem;
        line-height: 1.35;
    }

    .achievement-item p {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .achievement-item:hover {
        transform: translateX(3px);
    }

    .projects-carousel-container {
        max-width: 100%;
        padding: 0 var(--space-4);
    }
    
    /* Mobile - Adaptive grid handled by responsive breakpoints above */
    /* Grid now uses auto-fit minmax for responsive behavior */

    .projects-carousel.initial-view .project-card {
        min-height: 150px;
    }

    .projects-carousel.initial-view .project-media {
        height: 80px;
    }

    .projects-carousel.initial-view .project-icon {
        font-size: 2rem;
    }
    
    .carousel-navigation {
        display: none; /* Hide navigation arrows on mobile */
    }
    
    .carousel-prev,
    .carousel-next {
        transform: none;
        position: static;
        margin: 0 var(--space-2);
    }
    
    .project-card {
        min-height: 400px;
        padding: var(--space-8);
    }
    
    .project-media {
        height: 150px;
        margin-bottom: var(--space-4);
    }
    
    .project-icon {
        font-size: 3rem;
    }
    
    .project-title {
        font-size: var(--font-size-2xl);
    }
    
    .project-description {
        font-size: var(--font-size-base);
    }

    .contact-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .section-container {
        padding: var(--space-16) var(--container-padding);
    }

    /* Bio sections responsive */
    .bio-section {
        padding: 1rem;
        margin-top: 1.25rem;
    }

    .bio-section h3 {
        font-size: 1.15rem;
        margin-bottom: 0.85rem;
    }

    .bio-section h4 {
        font-size: var(--font-size-base);
    }

    .philosophy-text {
        font-size: var(--font-size-base) !important;
        padding: var(--space-3);
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: var(--space-3);
    }

    .skill-item {
        padding: var(--space-4);
    }

    .about-description {
        max-width: 100%;
    }

    .about-description h2 {
        font-size: var(--font-size-2xl);
    }

    /* Education section responsive */
    .education-simple {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        text-align: center;
    }

    .education-content {
        text-align: center;
    }

    .education-content h4 {
        font-size: 1.1rem;
        line-height: 1.35;
        margin-bottom: 0.5rem;
    }

    .education-content p {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 0.75rem;
    }

    .education-years {
        font-size: 0.85rem;
        margin-top: 0.4rem;
        margin-bottom: 0.75rem;
    }

    .education-description {
        margin-top: 0.75rem;
        margin-bottom: 1rem !important;
    }

    .education-cta {
        padding: 0.65rem 1.25rem;
        font-size: 0.875rem;
    }

    .unam-logo-container {
        max-width: 200px;
    }

    /* Skills Filter Responsive */
    .skills-showcase h3 {
        font-size: clamp(1.5rem, 5vw, 2rem);
        letter-spacing: -1px;
        margin-bottom: 32px;
        gap: 12px;
    }

    .skills-showcase h3 > span:first-child {
        font-size: clamp(2rem, 6vw, 2.5rem);
    }

    .skills-filter-buttons {
        gap: var(--space-2);
    }

    .skill-filter-btn {
        padding: var(--space-2) var(--space-4);
        font-size: var(--font-size-xs);
    }

    .skills-grid-unified {
        gap: var(--space-3);
        max-width: 100%;
        padding: 0 var(--space-2);
    }

    .skills-grid-unified .skill-item {
        width: 85px;
        margin: 0;
    }

    .skills-grid-unified.user-filtered .skill-item {
        width: 120px;
    }
}

/* ===================================
   ANIMATIONS & UTILITIES
   =================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all var(--duration-slower) var(--ease-out-expo);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: all var(--duration-slower) var(--ease-out-expo);
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Smooth transitions for all interactive elements */
button, a, input, textarea {
    transition: all var(--duration-fast) var(--ease-out-expo);
}

/* Focus styles for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ==========================================
   FOOTER STYLES
   ========================================== */

.site-footer {
    background: linear-gradient(180deg, #0a1929 0%, #051120 100%);
    border-top: 1px solid rgba(89, 127, 215, 0.2);
    padding: 60px 20px 30px;
    position: relative;
    z-index: 10;
    margin-top: 100px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-section h3 {
    color: #89cff0;
    font-size: 1.2rem;
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.5px;
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    padding: 8px 0;
}

.footer-links a:hover {
    color: #89cff0;
    transform: translateX(5px);
}

.footer-links a i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    color: #597fd7;
}

.footer-tech {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 10px 0;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin: 0;
}

/* ==========================================
   LANGUAGE SELECTOR
   ========================================== */

.language-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(89, 127, 215, 0.1);
    border: 2px solid rgba(89, 127, 215, 0.3);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.lang-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(89, 127, 215, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.lang-btn:hover {
    background: rgba(89, 127, 215, 0.2);
    border-color: rgba(89, 127, 215, 0.5);
    transform: translateY(-2px);
}

.lang-btn:hover::before {
    width: 200px;
    height: 200px;
}

.lang-btn.active {
    background: rgba(89, 127, 215, 0.3);
    border-color: #597fd7;
    color: #fff;
    box-shadow: 0 0 20px rgba(89, 127, 215, 0.3);
}

.lang-btn.active::before {
    background: rgba(89, 127, 215, 0.1);
}

.flag-icon {
    font-size: 1.3rem;
    line-height: 1;
    position: relative;
    z-index: 1;
}

.lang-btn span:last-child {
    position: relative;
    z-index: 1;
}

/* ==========================================
   BACK TO TOP BUTTON
   ========================================== */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #597fd7, #89cff0);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(89, 127, 215, 0.3);
}

.back-to-top i {
    font-size: 1.2rem;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px rgba(89, 127, 215, 0.5);
}

.back-to-top:active {
    transform: translateY(-2px);
}

/* ==========================================
   I18N TRANSITION ANIMATION
   ========================================== */

.i18n-transitioning {
    opacity: 0.5;
    transform: translateY(-3px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* ==========================================
   RESPONSIVE FOOTER
   ========================================== */

@media (max-width: 768px) {
    .site-footer {
        padding: 40px 20px 20px;
        margin-top: 60px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-links {
        align-items: center;
    }

    .footer-links a:hover {
        transform: translateX(0) scale(1.05);
    }

    .language-selector {
        justify-content: center;
    }

    .lang-btn {
        flex: 1;
        min-width: 130px;
        justify-content: center;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .back-to-top i {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .footer-section h3 {
        font-size: 1.1rem;
    }

    .lang-btn {
        padding: 8px 14px;
        font-size: 0.9rem;
        min-width: 120px;
    }

    .footer-tech {
        font-size: 0.85rem;
    }

    .footer-copyright {
        font-size: 0.85rem;
    }
}

/* Tablet Portrait */
@media (min-width: 481px) and (max-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-info {
        grid-column: 1 / -1;
    }

    /* Purpose for tablets */
    .purpose-quote {
        font-size: 1.15rem;
        padding-left: 1.15rem;
    }

    .purpose-pillars {
        grid-template-columns: 1fr;
        gap: 1.35rem;
    }

    .pillar-item {
        padding: 1.35rem;
    }

    .pillar-icon {
        font-size: 2.25rem;
    }

    .pillar-item h4 {
        font-size: 1.15rem;
    }

    .pillar-item p {
        font-size: 0.95rem;
    }
}

/* ===================================
   PREMIUM CONTACT FORM - GLASSMORPHISM
   =================================== */

.contact-form-wrapper {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    padding: 48px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-form-wrapper:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Optional 3D Particles Background */
.form-particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
}

.contact-form {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 100%;
    box-sizing: border-box;
}

/* ===================================
   FORM FIELDS - FLOATING LABELS
   =================================== */

.form-field {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 100%;
    box-sizing: border-box;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 100%;
}

.form-input {
    width: 100%;
    max-width: 100%;
    padding: 20px 16px;
    padding-top: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-sizing: border-box;
}

.form-textarea {
    min-height: 120px;
    max-height: 300px;
    resize: vertical;
    padding-right: 48px;
}

/* Floating Label */
.form-label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    font-weight: 400;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    padding: 0 4px;
    z-index: 2;
}

.label-required {
    color: #ef4444;
    font-weight: 600;
}

/* Float label on focus or when input has value */
.form-input:focus ~ .form-label,
.form-input:not(:placeholder-shown) ~ .form-label,
.form-input.has-value ~ .form-label {
    top: 8px;
    transform: translateY(0);
    font-size: 12px;
    font-weight: 500;
    color: #597fd7;
    background: linear-gradient(
        to bottom,
        transparent 40%,
        rgba(10, 25, 41, 0.95) 40%,
        rgba(10, 25, 41, 0.95) 60%,
        transparent 60%
    );
}

/* Input States */
.form-input:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: #597fd7;
    box-shadow: 
        0 0 0 4px rgba(89, 127, 215, 0.1),
        0 4px 20px rgba(89, 127, 215, 0.15);
}

.form-input:hover:not(:focus) {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Validation States */
.form-field.valid .form-input {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.form-field.invalid .form-input {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

/* Pre-filled Form Field Indicator */
.form-input.pre-filled {
    background: rgba(89, 127, 215, 0.05);
    border-left: 3px solid #597fd7;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input.pre-filled:focus {
    background: rgba(89, 127, 215, 0.08);
    border-left-color: #89cff0;
}

/* Screen Reader Only (for accessibility announcements) */
.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;
}

/* Input Decoration (Animated underline) */
.input-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #597fd7, #89cff0);
    border-radius: 2px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.form-input:focus ~ .input-decoration {
    width: 100%;
}

/* ===================================
   VALIDATION ICONS & MESSAGES
   =================================== */

.validation-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.form-textarea ~ .validation-icon {
    top: 20px;
    transform: translateY(0);
}

.validation-icon svg {
    width: 100%;
    height: 100%;
}

.icon-success {
    color: #10b981;
    display: none;
}

.icon-error {
    color: #ef4444;
    display: none;
}

.form-field.valid .validation-icon {
    opacity: 1;
    animation: iconBounce 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-field.valid .icon-success {
    display: block;
}

.form-field.invalid .validation-icon {
    opacity: 1;
    animation: iconShake 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-field.invalid .icon-error {
    display: block;
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.2); }
}

@keyframes iconShake {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    25% { transform: translateY(-50%) translateX(-4px); }
    75% { transform: translateY(-50%) translateX(4px); }
}

/* Form Hints and Errors */
.form-hint {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    opacity: 0.8;
    transition: color 0.2s;
}

.form-input:focus ~ .form-hint {
    color: #597fd7;
}

.form-error {
    font-size: 14px;
    color: #ef4444;
    font-weight: 500;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-field.invalid .form-error {
    opacity: 1;
    max-height: 100px;
    margin-top: 8px;
}

/* Character Counter */
.character-count {
    align-self: flex-end;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.character-count .count-current {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s;
}

.form-field.valid .character-count .count-current {
    color: #10b981;
}

.form-field.invalid .character-count .count-current {
    color: #ef4444;
}

/* ===================================
   HCAPTCHA VERIFICATION FIELD
   =================================== */

/* hCaptcha Container */
.form-field.captcha-field {
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.form-field.captcha-field .h-captcha {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(10, 25, 41, 0.3);
    padding: 0.5rem;
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus state para accesibilidad */
.form-field.captcha-field .h-captcha:focus-within {
    outline: 2px solid #597fd7;
    outline-offset: 4px;
    box-shadow: 0 0 0 4px rgba(89, 127, 215, 0.1);
    border-color: rgba(89, 127, 215, 0.3);
}

/* Error state cuando CAPTCHA no completado */
.form-field.captcha-field.captcha-error .h-captcha {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    animation: captchaShake 0.3s ease-in-out;
}

@keyframes captchaShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Success state */
.form-field.captcha-field.valid .h-captcha {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

/* Error message para CAPTCHA */
.form-field.captcha-field .form-error {
    text-align: center;
    margin-top: 0.5rem;
}

/* Responsive - escalar en móviles */
@media (max-width: 768px) {
    .form-field.captcha-field .h-captcha {
        transform: scale(0.9);
        transform-origin: center;
    }

    .form-field.captcha-field {
        margin: 1.5rem 0;
    }
}

@media (max-width: 480px) {
    .form-field.captcha-field .h-captcha {
        transform: scale(0.77);
        overflow: hidden;
    }

    .form-field.captcha-field {
        margin: 1rem 0;
        overflow: hidden;
    }
}

/* ===================================
   SUBMIT BUTTON - MULTI-STATE
   =================================== */

.form-submit {
    position: relative;
    width: 100%;
    padding: 20px 32px;
    background: linear-gradient(135deg, #597fd7, #4a6bb8);
    color: white;
    border: none;
    border-radius: 16px;
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(89, 127, 215, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

.form-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.form-submit:hover::before {
    left: 100%;
}

.form-submit:hover {
    background: linear-gradient(135deg, #4a6bb8, #3a5a9a);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(89, 127, 215, 0.4);
}

.form-submit:active {
    transform: translateY(0);
    box-shadow: 0 4px 16px rgba(89, 127, 215, 0.3);
}

.form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Button States */
.btn-loader {
    display: none;
    gap: 8px;
}

.form-submit.loading .btn-text,
.form-submit.loading .btn-icon {
    opacity: 0;
}

.form-submit.loading .btn-loader {
    display: flex;
}

.form-submit.success .btn-text {
    opacity: 1;
    font-weight: 600;
}

.form-submit.success .btn-icon,
.form-submit.success .btn-loader,
.form-submit.success .btn-success-icon {
    opacity: 0;
    display: none;
}

.btn-success-icon {
    display: none;
}

@keyframes successPop {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    50% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}


/* ===================================
   STATUS MESSAGES
   =================================== */

.form-status {
    margin-top: 24px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-status.visible {
    opacity: 1;
    max-height: 200px;
}

.status-success,
.status-error {
    display: none;
    padding: 24px;
    border-radius: 16px;
    gap: 16px;
    align-items: flex-start;
    animation: statusSlide 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes statusSlide {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.status-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.status-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.form-status.success .status-success,
.form-status.error .status-error {
    display: flex;
}

.status-success h4,
.status-error h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.status-success p,
.status-error p {
    font-size: 14px;
    opacity: 0.9;
}

.status-success svg,
.status-error svg {
    flex-shrink: 0;
    margin-top: 2px;
}

/* ===================================
   CONTACT SOCIAL LINKS
   =================================== */

.contact-social {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.social-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 16px;
}

.contact-social .social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.contact-social .social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 500;
}

.contact-social .social-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #597fd7;
    color: #89cff0;
    transform: translateY(-2px);
}

.contact-social .social-link svg {
    width: 20px;
    height: 20px;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 768px) {
    .contact-form-wrapper {
        padding: 20px;
        border-radius: 24px;
        width: calc(100% - 32px);
        margin: 0 auto;
    }

    .form-input {
        padding: 16px 12px;
        padding-top: 20px;
        font-size: 14px;
    }

    .form-textarea {
        min-height: 100px;
    }

    .form-submit {
        padding: 16px 24px;
        font-size: 16px;
    }

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

    .contact-social .social-link {
        width: 100%;
        justify-content: center;
    }
}

/* Mobile Small Devices - Prevent Overflow */
@media (max-width: 480px) {
    .contact-form-wrapper {
        padding: 16px;
        width: calc(100% - 24px);
        border-radius: 20px;
    }

    .form-input {
        padding: 14px 10px;
        padding-top: 18px;
        font-size: 14px;
    }

    .form-submit {
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* ===================================
   ACCESSIBILITY - FOCUS STATES
   =================================== */

.form-input:focus-visible {
    outline: 3px solid #597fd7;
    outline-offset: 2px;
}

.form-submit:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 4px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .form-input {
        border-width: 3px;
    }
    
    .form-field.valid .form-input {
        border-width: 3px;
    }
    
    .form-field.invalid .form-input {
        border-width: 3px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .form-input,
    .form-label,
    .validation-icon,
    .form-submit,
    .form-status {
        animation: none !important;
        transition: none !important;
    }
}

/* Screen Reader Only Utility */
.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;
}

/* ===================================
   CONTACT SECTION ENHANCEMENTS
   Modern UI Elements (2025)
   =================================== */

/* Workflow Steps - Illustrated Cards */
.workflow-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-bottom: 64px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
}

.workflow-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 24px;
    background: linear-gradient(135deg, rgba(89, 127, 215, 0.15) 0%, rgba(137, 207, 240, 0.1) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(89, 127, 215, 0.2);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.workflow-step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(89, 127, 215, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.workflow-step:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(89, 127, 215, 0.4);
    box-shadow: 0 20px 60px rgba(89, 127, 215, 0.3),
                0 0 40px rgba(137, 207, 240, 0.2);
}

.workflow-step:hover::before {
    opacity: 1;
}

.step-illustration {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(89, 127, 215, 0.3), rgba(137, 207, 240, 0.2));
    border-radius: 50%;
    box-shadow: 0 10px 40px rgba(89, 127, 215, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.workflow-step:hover .step-illustration {
    transform: scale(1.1);
    box-shadow: 0 15px 50px rgba(89, 127, 215, 0.4);
}

.step-icon {
    font-size: 48px;
    line-height: 1;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.step-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px 0;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.step-description {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
    max-width: 320px;
}

/* Contact Info Text - Motivational Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 64px;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.contact-info-text {
    position: relative;
    z-index: 1;
    padding: 0;
}

.contact-info-title {
    position: relative;
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    color: #597fd7; /* Primary Blue from palette */
    margin: 0;
    letter-spacing: -2px;
    text-transform: capitalize;
}

.contact-info-title::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #597fd7, #89cff0);
    border-radius: 2px;
    box-shadow: 0 0 20px rgba(89, 127, 215, 0.6);
}

/* Floating Decorative Shapes */
.contact-decorations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.floating-shape {
    position: absolute;
    opacity: 0.08;
    animation: float 15s ease-in-out infinite;
}

.shape-circle {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #597fd7, #89cff0);
    border-radius: 50%;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
    animation-duration: 18s;
}

.shape-square {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #89cff0, #597fd7);
    border-radius: 20px;
    top: 70%;
    right: 10%;
    animation-delay: 3s;
    animation-duration: 22s;
    transform: rotate(45deg);
}

.shape-triangle {
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 100px solid rgba(137, 207, 240, 0.3);
    top: 50%;
    left: 80%;
    animation-delay: 6s;
    animation-duration: 20s;
}

.shape-hexagon {
    width: 100px;
    height: 57.74px;
    background: linear-gradient(135deg, #597fd7, #0a2463);
    position: relative;
    top: 20%;
    right: 5%;
    animation-delay: 9s;
    animation-duration: 25s;
}

.shape-hexagon::before,
.shape-hexagon::after {
    content: "";
    position: absolute;
    width: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
}

.shape-hexagon::before {
    bottom: 100%;
    border-bottom: 28.87px solid rgba(89, 127, 215, 0.3);
}

.shape-hexagon::after {
    top: 100%;
    border-top: 28.87px solid rgba(89, 127, 215, 0.3);
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(30px, -30px) rotate(90deg);
    }
    50% {
        transform: translate(-20px, 40px) rotate(180deg);
    }
    75% {
        transform: translate(40px, 20px) rotate(270deg);
    }
}

/* Ambient Gradient Background */
.ambient-gradient {
    position: absolute;
    inset: -100%;
    background: radial-gradient(
        circle at 50% 50%,
        rgba(89, 127, 215, 0.15) 0%,
        rgba(137, 207, 240, 0.1) 25%,
        transparent 50%
    );
    opacity: 0.6;
    filter: blur(60px);
    animation: ambientMove 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes ambientMove {
    0%, 100% {
        transform: translate(0%, 0%) scale(1);
    }
    33% {
        transform: translate(20%, -20%) scale(1.1);
    }
    66% {
        transform: translate(-20%, 20%) scale(0.9);
    }
}

/* Mouse Spotlight Effect */
.form-spotlight {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(
        circle closest-side,
        rgba(89, 127, 215, 0.15),
        transparent
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 0;
}

.contact-form-wrapper:hover .form-spotlight {
    opacity: 1;
}

/* Enhanced Input Focus Effects */
.form-field {
    position: relative;
}

.form-field::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: radial-gradient(
        600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(137, 207, 240, 0.15),
        transparent 40%
    );
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: -1;
}

.form-field:focus-within::before {
    opacity: 1;
}

/* Enhanced form input focus */
.form-input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: #597fd7;
    box-shadow: 
        0 0 0 1px rgba(89, 127, 215, 0.3),
        0 0 20px rgba(89, 127, 215, 0.2),
        0 8px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* Form Progress Indicator */
.form-progress {
    margin: 16px 0 24px 0;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-progress.visible {
    opacity: 1;
    max-height: 50px;
}

.progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #597fd7, #89cff0);
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(89, 127, 215, 0.5);
}

.progress-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.progress-percentage {
    color: #89cff0;
    font-weight: 600;
}

/* Enhanced Submit Button - Liquid Effects */
.form-submit {
    position: relative;
    overflow: hidden;
    will-change: transform;
}

.form-submit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.form-submit:active::before {
    width: 300px;
    height: 300px;
}

.form-submit:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 10px 30px rgba(89, 127, 215, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.form-submit.success {
    background: linear-gradient(135deg, #10b981, #059669);
    transform: scale(1);
    transition: all 0.3s ease;
}

.form-submit.loading {
    background: linear-gradient(
        90deg,
        #597fd7 0%,
        #89cff0 50%,
        #597fd7 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Confetti Animation */
.confetti {
    position: absolute;
    width: 8px;
    height: 8px;
    top: -10px;
    border-radius: 50%;
    animation: confettiFall 3s linear forwards;
    pointer-events: none;
    z-index: 100;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Geometric Pattern Overlay */
.contact-form-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(30deg, rgba(89, 127, 215, 0.02) 12%, transparent 12.5%, transparent 87%, rgba(89, 127, 215, 0.02) 87.5%, rgba(89, 127, 215, 0.02)),
        linear-gradient(150deg, rgba(89, 127, 215, 0.02) 12%, transparent 12.5%, transparent 87%, rgba(89, 127, 215, 0.02) 87.5%, rgba(89, 127, 215, 0.02)),
        linear-gradient(30deg, rgba(89, 127, 215, 0.02) 12%, transparent 12.5%, transparent 87%, rgba(89, 127, 215, 0.02) 87.5%, rgba(89, 127, 215, 0.02)),
        linear-gradient(150deg, rgba(89, 127, 215, 0.02) 12%, transparent 12.5%, transparent 87%, rgba(89, 127, 215, 0.02) 87.5%, rgba(89, 127, 215, 0.02));
    background-size: 80px 140px;
    background-position: 0 0, 0 0, 40px 70px, 40px 70px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

/* Scroll Animation Base */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Adjustments */
/* Tablet landscape */
@media (max-width: 1024px) {
    .workflow-steps {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 24px;
        padding: 0 16px;
    }

    .workflow-step {
        padding: 28px 20px;
    }

    .step-illustration {
        width: 90px;
        height: 90px;
        margin-bottom: 18px;
    }

    .step-icon {
        font-size: 42px;
    }

    .step-title {
        font-size: 18px;
        margin: 0 0 10px 0;
    }

    .step-description {
        font-size: 14px;
    }
}

/* Tablet portrait */
@media (max-width: 768px) {
    .workflow-steps {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        padding: 0;
    }

    .workflow-step {
        padding: 16px 10px;
        background: transparent;
        border: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .step-illustration {
        width: 60px;
        height: 60px;
        margin-bottom: 10px;
        background: none;
        border: none;
    }

    .step-icon {
        font-size: 32px;
    }

    .step-title {
        font-size: 12px;
        line-height: 1.3;
        margin: 0;
        font-weight: 600;
    }

    .step-description {
        display: none;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .workflow-steps {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin-bottom: 48px;
    }

    .workflow-step {
        padding: 12px 6px;
        border-radius: 12px;
        background: transparent;
        border: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .step-illustration {
        width: 50px;
        height: 50px;
        margin-bottom: 8px;
        background: none;
        border: none;
    }

    .step-icon {
        font-size: 28px;
    }

    .step-title {
        font-size: 11px;
        line-height: 1.3;
        margin: 0;
        font-weight: 600;
    }

    .step-description {
        display: none;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-info-text {
        padding: 0;
    }

    .contact-info-title {
        font-size: 36px;
        letter-spacing: -1px;
    }

    .contact-info-title::after {
        width: 60px;
        height: 3px;
        bottom: -12px;
    }

    .floating-shape {
        opacity: 0.04;
    }

    .shape-circle {
        width: 80px;
        height: 80px;
    }

    .shape-square {
        width: 60px;
        height: 60px;
    }

    .form-spotlight {
        display: none;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .floating-shape,
    .ambient-gradient {
        animation: none !important;
    }

    .contact-feature:hover,
    .trust-badge:hover,
    .form-input:focus,
    .form-submit:hover {
        transform: none !important;
    }

    .confetti {
        display: none;
    }
}

/* Accessibility - High Contrast */
@media (prefers-contrast: high) {
    .contact-feature,
    .trust-badge,
    .form-input {
        border-width: 2px;
    }

    .badge-value {
        -webkit-text-fill-color: #89cff0;
    }
}

/* Email Smart Suggestions */
.email-suggestion {
    margin-top: 8px;
    padding: 12px 16px;
    background: rgba(137, 207, 240, 0.1);
    border: 1px solid rgba(137, 207, 240, 0.3);
    border-radius: 8px;
    font-size: 13px;
    color: #89cff0;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.email-suggestion.visible {
    opacity: 1;
    max-height: 60px;
}

.email-suggestion:hover {
    background: rgba(137, 207, 240, 0.15);
    border-color: rgba(137, 207, 240, 0.5);
}

.suggestion-icon {
    width: 16px;
    height: 16px;
    color: #89cff0;
    flex-shrink: 0;
}

.suggestion-text {
    color: #fff;
    font-weight: 600;
}

/* Scroll animations for form wrapper and fields */
.contact-form-wrapper,
.form-field {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-form-wrapper.animate-in,
.form-field.animate-in {
    opacity: 1;
    transform: translateY(0);
}
