:root {
    /* Pure Black & Obsidian Palette */
    --bg-primary: #050608;
    --bg-secondary: #0b0d13;
    --bg-tertiary: #10131d;
    --bg-card: rgba(16, 19, 29, 0.72);
    --bg-card-hover: rgba(22, 27, 42, 0.9);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-primary: #ffffff;
    --accent-secondary: #cbd5e1;
    --accent-cyan: #38bdf8;
    --accent-gradient: linear-gradient(135deg, #ffffff 0%, #e2e8f0 50%, #94a3b8 100%);
    --accent-cyan-gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    --accent-glow: rgba(255, 255, 255, 0.12);
    
    --glass-bg: rgba(5, 6, 8, 0.85);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(255, 255, 255, 0.22);
    --glass-card-border: rgba(255, 255, 255, 0.07);
    
    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-smooth: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-primary);
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #050608;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* Atmospheric Dark Space Ambient Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 18% 25%, rgba(56, 189, 248, 0.035) 0%, transparent 45%),
        radial-gradient(circle at 82% 70%, rgba(129, 140, 248, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.02) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
}

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

.highlight {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.highlight-cyan {
    background: var(--accent-cyan-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Utilities */
.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3.5rem;
    position: relative;
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    letter-spacing: -1px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 25%;
    width: 50%;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 2px;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 0;
    transition: var(--transition-fast);
    z-index: 1000;
    background: transparent;
}

.navbar.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.brand-logo {
    height: 38px;
    width: auto;
    display: block;
    transition: var(--transition-fast);
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
}

.brand:hover .brand-logo {
    transform: scale(1.03);
}

.brand-text {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -1px;
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
}

.nav-links a:not(.btn-primary-sm):hover {
    color: #ffffff;
}

.btn-primary-sm {
    background: #ffffff;
    padding: 0.55rem 1.4rem;
    border-radius: 999px;
    color: #000000 !important;
    font-weight: 700 !important;
    border: 1px solid #ffffff;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

.btn-primary-sm:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.22);
}

/* Language Selector Component with Flag Icons */
.lang-selector {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.55rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    margin-left: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.lang-option {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-muted) !important;
    text-decoration: none;
    padding: 0.22rem 0.5rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    transition: var(--transition-fast);
    line-height: 1;
    border: 1px solid transparent;
}

.lang-flag {
    width: 1em;
    height: 1em;
    border-radius: 50% !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    display: inline-block;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    line-height: 1;
}

.lang-text {
    letter-spacing: 0.5px;
    font-size: 0.74rem;
}

.lang-option:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.lang-option.active {
    color: #050608 !important;
    background: #ffffff;
    font-weight: 800;
    border-color: #ffffff;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.3);
}

.lang-option.active .lang-flag {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.lang-divider {
    color: rgba(255, 255, 255, 0.15);
    font-size: 0.7rem;
    user-select: none;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* Sections */
section {
    padding: 8rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* ==========================================================================
   Hero Section & Seamless Logo Target
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 100px;
    position: relative;
}

.hero-content {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* The exact bounding box target for preloader transition */
.hero-logo-container {
    width: 200px;
    height: 200px;
    margin-bottom: 2rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0; /* Hidden while preloader is running; revealed on handoff */
    transition: opacity 0.25s ease;
}

@media (min-width: 768px) {
    .hero-logo-container {
        width: 220px;
        height: 220px;
    }
}

.hero-logo-container.is-visible {
    opacity: 1;
}

.hero-logo-svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 8px 30px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 25px rgba(255, 255, 255, 0.06));
}

.hero h1,
.hero-title {
    font-size: 4.2rem;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
    color: #ffffff;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero p,
.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.8rem;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s;
}

.btn-group {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.2s, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

/* Revealed Hero text & buttons */
.hero-content.revealed .hero-title,
.hero-content.revealed .hero-subtitle,
.hero-content.revealed .btn-group {
    opacity: 1;
    transform: translateY(0);
}

.btn-primary, .btn-secondary {
    padding: 1rem 2.4rem;
    border-radius: 999px;
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition-normal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #ffffff;
    color: #000000;
    border: 1px solid #ffffff;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.12);
}

.btn-primary:hover {
    background: #f1f5f9;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.28);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

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

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.15rem;
    line-height: 1.7;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 2rem;
}

.skill-tag {
    background: var(--bg-card);
    border: 1px solid var(--glass-card-border);
    padding: 0.55rem 1.1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.skill-tag:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-card-border);
    padding: 2.2rem;
    border-radius: 20px;
    text-align: center;
    transition: var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--glass-border-hover);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.stat-number {
    font-size: 3.2rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.25rem;
    letter-spacing: -1px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ==========================================================================
   Portfolio Section & Antigravity 3D UI Motion Cards
   ========================================================================== */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
    gap: 2.8rem;
    margin-top: 4rem;
    perspective: 1200px;
}

.project-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.04) 0%, rgba(16, 19, 29, 0.82) 100%);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 26px;
    overflow: hidden;
    border: 1px solid var(--glass-card-border);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    transform-style: preserve-3d;
    will-change: transform, box-shadow;
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.6), 
                inset 0 1px 1px 0 rgba(255, 255, 255, 0.12);
}

/* Stagger cascade entrance */
.portfolio-grid .project-card.fade-up {
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-grid .project-card:nth-child(1) { transition-delay: 0.05s; }
.portfolio-grid .project-card:nth-child(2) { transition-delay: 0.15s; }
.portfolio-grid .project-card:nth-child(3) { transition-delay: 0.25s; }
.portfolio-grid .project-card:nth-child(4) { transition-delay: 0.35s; }
.portfolio-grid .project-card:nth-child(5) { transition-delay: 0.45s; }

/* Dynamic Spotlight / Sheen Reflection */
.project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 26px;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.08), transparent 40%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 4;
}

.project-card:hover::before {
    opacity: 1;
}

.project-card:hover {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 28px 60px -12px rgba(0, 0, 0, 0.85), 
                0 0 35px -5px rgba(56, 189, 248, 0.1), 
                inset 0 1px 1px 0 rgba(255, 255, 255, 0.25);
}

/* Image Showcase with Silky Smooth Auto-Scroll Preview */
.project-img {
    width: 100%;
    height: 290px;
    overflow: hidden;
    position: relative;
    background: #08090d;
    transform-style: preserve-3d;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
}

.project-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
}

.project-card:hover .project-thumb {
    transform: scale(1.05);
    filter: brightness(1.05);
}

.project-scroll-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    min-height: 100%;
    z-index: 2;
    transform: translateY(0);
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    will-change: transform, opacity;
}

.project-card:hover .project-scroll-preview {
    opacity: 1;
    transform: translateY(calc(-100% + 290px));
    transition: transform 6.5s cubic-bezier(0.2, 0.8, 0.4, 1), opacity 0.4s ease;
}

/* Smooth Curtain Reveal & Overlay */
.project-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, rgba(5, 6, 8, 0) 0%, rgba(5, 6, 8, 0.5) 60%, rgba(5, 6, 8, 0.95) 100%);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 1.5rem;
    z-index: 3;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

/* Pop-in Badges (UI Motion Spring Seed) */
.preview-badge {
    background: rgba(16, 19, 29, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    pointer-events: none;
    transform: translateY(14px) scale(0.9);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.05s,
                opacity 0.35s ease 0.05s;
}

.preview-badge i {
    color: var(--accent-cyan);
}

.project-card:hover .preview-badge {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transform: translateY(14px) scale(0.9);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s,
                opacity 0.35s ease 0.1s,
                background 0.2s ease,
                color 0.2s ease,
                box-shadow 0.2s ease;
}

.project-card:hover .project-link {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.project-link:hover {
    background: #ffffff;
    color: #000000;
    transform: translateY(-2px) scale(1.04) !important;
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.35);
}

.project-link:active {
    transform: translateY(0) scale(0.98) !important;
}

/* Card Content Area */
.project-content {
    padding: 2.2rem;
    transform: translateZ(10px);
}

.project-category {
    color: var(--accent-cyan);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.6rem;
    display: block;
    font-weight: 600;
}

.project-title {
    font-size: 1.65rem;
    margin-bottom: 1rem;
    color: #ffffff;
    font-family: var(--font-heading);
    letter-spacing: -0.5px;
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.6rem;
    line-height: 1.65;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.project-tags span {
    font-size: 0.78rem;
    padding: 0.38rem 0.9rem;
    background: rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                background 0.25s ease, 
                border-color 0.25s ease, 
                color 0.25s ease;
}

.project-tags span:hover {
    transform: translateY(-2px);
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.3);
    color: #ffffff;
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 4rem;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 4rem;
    border-radius: 30px;
    border: 1px solid var(--glass-card-border);
}

.contact-info h3 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.contact-icon {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #ffffff;
}

.form-alert {
    padding: 1.1rem 1.4rem;
    border-radius: 14px;
    margin-bottom: 1.5rem;
    font-size: 0.98rem;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    animation: alertSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.form-alert-success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.45);
    color: #4ade80;
    box-shadow: 0 0 25px rgba(34, 197, 94, 0.15);
}

.form-alert-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.45);
    color: #f87171;
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.15);
}

.form-alert i {
    font-size: 1.35rem;
    flex-shrink: 0;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.1rem 1.4rem;
    background: rgba(5, 6, 8, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(10, 12, 18, 0.85);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.08);
}

.form-group textarea {
    height: 150px;
    resize: none;
}

.btn-submit {
    width: 100%;
    background: #ffffff;
    color: #000000;
    font-weight: 700;
    border: 1px solid #ffffff;
    padding: 1.1rem;
    border-radius: 14px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition-normal);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.12);
}

.btn-submit:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.22);
}

/* Footer */
.footer {
    background: #030406;
    padding: 5rem 2rem 2rem;
    border-top: 1px solid var(--glass-border);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.footer-col p {
    color: var(--text-secondary);
    max-width: 320px;
    font-size: 0.95rem;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    font-size: 1.15rem;
    color: #ffffff;
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 0.8rem;
    transition: var(--transition-fast);
}

.footer-col a:hover {
    color: #ffffff;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.social-links a:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Scroll Fade Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ==========================================================================
   Full-Screen Preloader Animation & Seamless FLIP Transition
   ========================================================================== */
body.preloader-active {
    overflow: hidden !important;
}

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000000;
    z-index: 999999;
    overflow: hidden;
    pointer-events: all;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity;
}

.preloader.preloader-fading {
    opacity: 0;
    pointer-events: none;
}

.preloader.preloader-hidden {
    display: none !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Logo wrapper inside preloader: fixed coordinate base */
.preloader-logo-wrapper {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    z-index: 1000000;
    transform-origin: center center;
    will-change: transform, opacity;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.8));
}

@media (min-width: 768px) {
    .preloader-logo-wrapper {
        width: 220px;
        height: 220px;
    }
}

.preloader-svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}

/* Sequential element reveal animations (Total typing: ~0.95s) */
.logo-part-anim {
    opacity: 0;
    transform-origin: center;
    animation-duration: 1.05s;
    animation-fill-mode: forwards;
    animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}

.part-1 { animation-name: preloaderShowPart1; }
.part-2 { animation-name: preloaderShowPart2; }
.part-3 { animation-name: preloaderShowPart3; }
.part-4 { animation-name: preloaderShowPart4; }
.part-5 { animation-name: preloaderShowPart5; }

@keyframes preloaderShowPart1 {
    0%, 9.9% { opacity: 0; transform: scale(0.92); }
    10%, 100% { opacity: 1; transform: scale(1); }
}

@keyframes preloaderShowPart2 {
    0%, 23.9% { opacity: 0; transform: scale(0.92); }
    24%, 100% { opacity: 1; transform: scale(1); }
}

@keyframes preloaderShowPart3 {
    0%, 37.9% { opacity: 0; transform: scale(0.92); }
    38%, 100% { opacity: 1; transform: scale(1); }
}

@keyframes preloaderShowPart4 {
    0%, 51.9% { opacity: 0; transform: scale(0.92); }
    52%, 100% { opacity: 1; transform: scale(1); }
}

@keyframes preloaderShowPart5 {
    0%, 65.9% { opacity: 0; transform: scale(0.92); }
    66%, 100% { opacity: 1; transform: scale(1); }
}

/* Luminous pulse when entire logo is formed */
.logo-parts {
    animation: preloaderLogoPulse 1.05s ease-out forwards;
}

@keyframes preloaderLogoPulse {
    0%, 67% {
        filter: drop-shadow(0 0 0px rgba(255, 255, 255, 0));
    }
    75% {
        filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.95)) drop-shadow(0 0 32px rgba(56, 189, 248, 0.65));
    }
    100% {
        filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.3));
    }
}

/* Typing / Blinking Cursor tracking the drawing */
.logo-cursor {
    fill: #ffffff;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.9));
    animation: preloaderCursorMove 1.05s cubic-bezier(0.2, 0.8, 0.2, 1) forwards,
               preloaderCursorBlink 0.14s steps(2, start) infinite;
}

@keyframes preloaderCursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.15; }
}

@keyframes preloaderCursorMove {
    /* 0%: At start of left bracket [ */
    0%, 9.9% {
        x: 8px;
        y: 141px;
        width: 12px;
        height: 420px;
        opacity: 1;
    }
    /* 10%: After typing [ */
    10%, 23.9% {
        x: 125px;
        y: 141px;
        width: 12px;
        height: 420px;
        opacity: 1;
    }
    /* 24%: After typing C */
    24%, 37.9% {
        x: 275px;
        y: 141px;
        width: 12px;
        height: 420px;
        opacity: 1;
    }
    /* 38%: After typing O */
    38%, 51.9% {
        x: 468px;
        y: 141px;
        width: 12px;
        height: 420px;
        opacity: 1;
    }
    /* 52%: After typing ] */
    52%, 65.9% {
        x: 572px;
        y: 141px;
        width: 12px;
        height: 420px;
        opacity: 1;
    }
    /* 66%: After typing 2 (superscript) */
    66%, 78% {
        x: 662px;
        y: 67px;
        width: 10px;
        height: 105px;
        opacity: 1;
    }
    /* 79% - 100%: Cursor disappears */
    79%, 100% {
        x: 662px;
        y: 67px;
        width: 10px;
        height: 105px;
        opacity: 0;
    }
}

/* Brand text underneath in SVG */
.logo-text-anim {
    opacity: 0;
    animation: preloaderTextFade 1.05s ease-out forwards;
}

@keyframes preloaderTextFade {
    0%, 65% {
        opacity: 0;
        transform: translateY(8px);
    }
    78%, 100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Rules */
@media (max-width: 992px) {
    .about-grid, .contact-container, .footer-container {
        grid-template-columns: 1fr;
    }
    
    .hero h1, .hero-title {
        font-size: 3.4rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(5, 6, 8, 0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 2.2rem 2rem;
        gap: 1.8rem;
        border-bottom: 1px solid var(--glass-border);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
        text-align: center;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .lang-selector {
        margin: 0.5rem auto 0 auto;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero h1, .hero-title {
        font-size: 2.6rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .contact-container {
        padding: 2rem;
    }
}

/* ==========================================================================
   Nuestros Clientes Section & 3D Map Canvas
   ========================================================================== */
.clients-section {
    padding: 6rem 2rem 0 2rem;
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

#portfolio {
    position: relative;
    z-index: 5;
    margin-top: -6rem;
    padding-top: 4rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.15rem;
    max-width: 720px;
    margin: -2rem auto 3rem auto;
    line-height: 1.6;
}

.map-hud-container {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    position: relative;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* SVG Map Canvas with Top & Bottom Fade Degradé */
.svg-map-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1100 / 880;
    z-index: 3;
    perspective: 1200px;
    mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.4) 5%,
        rgba(0, 0, 0, 1) 15%,
        rgba(0, 0, 0, 1) 58%,
        rgba(0, 0, 0, 0.4) 75%,
        transparent 94%
    );
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.4) 5%,
        rgba(0, 0, 0, 1) 15%,
        rgba(0, 0, 0, 1) 58%,
        rgba(0, 0, 0, 0.4) 75%,
        transparent 94%
    );
}

.svg-map {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.8));
    transition: transform 0.4s ease;
}

/* District Geometry Styles */
.district-path {
    fill: rgba(16, 22, 36, 0.5);
    stroke: rgba(56, 189, 248, 0.14);
    stroke-width: 1.2;
    transition: fill 0.3s ease, stroke 0.3s ease;
}

.district-path:hover {
    fill: rgba(56, 189, 248, 0.12);
    stroke: rgba(56, 189, 248, 0.4);
}

.central-contour {
    fill: none;
    stroke: rgba(56, 189, 248, 0.32);
    stroke-width: 2.2;
    filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.3));
}

.lake-path {
    fill: rgba(56, 189, 248, 0.15);
    stroke: rgba(56, 189, 248, 0.45);
    stroke-width: 1.5;
}

/* 3D Curved Links & Animated Beams (Permanent Continuous Motion) */
.arc-shadow {
    fill: none;
    stroke: rgba(0, 0, 0, 0.5);
    stroke-width: 3.5;
    stroke-linecap: round;
}

.arc-base-curve {
    fill: none;
    stroke-linecap: round;
    opacity: 0.88;
    filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.5));
}

.arc-photon-beam {
    fill: none;
    stroke-linecap: round;
    stroke-dasharray: 10 24;
    animation: flowPhotonBeam 1.8s linear infinite;
    opacity: 0.9;
}

@keyframes flowPhotonBeam {
    from { stroke-dashoffset: 68; }
    to { stroke-dashoffset: 0; }
}

/* Radar & Halos */
.radar-ripple {
    fill: none;
    stroke: var(--accent-cyan);
    stroke-width: 1.4;
    transform-origin: center;
    animation: radarRipple 3s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.ripple-2 { animation-delay: 1s; }
.ripple-3 { animation-delay: 2s; }

@keyframes radarRipple {
    0% { r: 6; opacity: 0.95; stroke-width: 2.2; }
    100% { r: 44; opacity: 0; stroke-width: 0.4; }
}

.beacon-halo {
    fill: none;
    stroke-width: 1.2;
    transform-origin: center;
    animation: beaconHaloPulse 2.4s ease-out infinite;
}

@keyframes beaconHaloPulse {
    0% { r: 6; opacity: 0.8; }
    100% { r: 24; opacity: 0; }
}

.halo-purple { stroke: #c084fc; fill: rgba(192, 132, 252, 0.15); }
.halo-blue { stroke: #38bdf8; fill: rgba(56, 189, 248, 0.15); }
.halo-emerald { stroke: #34d399; fill: rgba(52, 211, 153, 0.15); }
.halo-amber { stroke: #fbbf24; fill: rgba(251, 191, 36, 0.15); }
.halo-rose { stroke: #f43f5e; fill: rgba(244, 63, 94, 0.15); }

/* Node Floating Hologram Badges in SVG (No Hover Scale/Animation) */
.node-target-pin, .hub-center-node {
    cursor: default;
    pointer-events: none;
}

.node-floating-badge {
    pointer-events: none;
}

.node-floating-badge rect {
    fill: #050608;
    stroke-width: 1.2;
}

.node-floating-badge text {
    font-family: var(--font-heading);
    font-size: 8.5px;
    font-weight: 700;
    fill: var(--text-primary);
    letter-spacing: 0.5px;
}

.badge-hub rect { stroke: var(--accent-cyan); }
.badge-hub text { fill: var(--accent-cyan); }
.badge-ciral rect { stroke: #c084fc; }
.badge-innovax rect { stroke: #38bdf8; }
.badge-hgs rect { stroke: #34d399; }
.badge-mevo rect { stroke: #f43f5e; }
.badge-gaucho rect { stroke: #fbbf24; }

@media (max-width: 992px) {
    .clients-section {
        padding: 4.5rem 1.5rem 0 1.5rem;
    }
    #portfolio {
        margin-top: -4.5rem;
    }
    .svg-map-wrapper {
        mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 84%, rgba(0, 0, 0, 0.4) 92%, transparent 100%),
                    linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 1) 64%, transparent 95%);
        -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 84%, rgba(0, 0, 0, 0.4) 92%, transparent 100%),
                            linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 1) 64%, transparent 95%);
        -webkit-mask-composite: destination-in;
        mask-composite: intersect;
    }
    .svg-map {
        transform-origin: 50% 34%;
        transform: scale(1.35);
    }
}

@media (max-width: 768px) {
    .clients-section {
        padding: 3.5rem 0.75rem 0 0.75rem;
        overflow: hidden;
    }
    #portfolio {
        margin-top: -3.5rem;
        padding-top: 2rem;
    }
    .svg-map-wrapper {
        aspect-ratio: 1 / 0.86;
        overflow: hidden;
        mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 75%, rgba(0, 0, 0, 0.35) 88%, transparent 100%),
                    linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 1) 8%, rgba(0, 0, 0, 1) 68%, transparent 96%);
        -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 75%, rgba(0, 0, 0, 0.35) 88%, transparent 100%),
                            linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 1) 8%, rgba(0, 0, 0, 1) 68%, transparent 96%);
        -webkit-mask-composite: destination-in;
        mask-composite: intersect;
    }
    .svg-map {
        transform-origin: 50% 34%;
        transform: scale(2.05);
    }
    .node-floating-badge text {
        font-size: 9.2px;
        font-weight: 800;
        letter-spacing: 0.3px;
    }
    .node-floating-badge rect {
        stroke-width: 1.4px;
    }
}

@media (max-width: 480px) {
    .svg-map-wrapper {
        aspect-ratio: 1 / 0.9;
        mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 72%, rgba(0, 0, 0, 0.3) 86%, transparent 100%),
                    linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 1) 7%, rgba(0, 0, 0, 1) 70%, transparent 96%);
        -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 72%, rgba(0, 0, 0, 0.3) 86%, transparent 100%),
                            linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 1) 7%, rgba(0, 0, 0, 1) 70%, transparent 96%);
        -webkit-mask-composite: destination-in;
        mask-composite: intersect;
    }
    .svg-map {
        transform-origin: 50% 34%;
        transform: scale(2.15);
    }
}


