:root {
    /* Colors */
    --bg-primary: #000000;
    --bg-secondary: #09090B;
    --bg-tertiary: #18181B;

    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --primary-200: #bae6fd;
    --primary-300: #7dd3fc;
    --primary-400: #38bdf8;
    --primary-500: #0ea5e9;
    --primary-600: #0284c7;
    --primary-700: #0369a1;
    --primary-800: #075985;
    --primary-900: #0c4a6e;

    --accent-color: var(--primary-400);
    --accent-glow: rgba(56, 189, 248, 0.5);

    --text-primary: #FFFFFF;
    --text-secondary: #E4E4E7;
    --text-tertiary: #A1A1AA;
    --text-quaternary: #71717A;

    /* Fonts */
    --font-sans: 'Plus Jakarta Sans', 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing */
    --container-padding: 2rem;
    --max-width: 1200px;

    /* Effects */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-bg: rgba(24, 24, 27, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --glass-blur: blur(12px);

    /* Mobile First Tokens */
    --section-spacing-mobile: 4rem;
    --h1-mobile: 2.75rem;
    --h2-mobile: 2.25rem;
    --container-padding-mobile: 1.5rem;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

h1,
h2,
h3,
h4 {
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding-mobile);
}

@media (min-width: 769px) {
    .container {
        padding: 0 var(--container-padding);
    }
}

.text-accent {
    color: var(--accent-color);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: var(--font-sans);
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-400);
    color: #000;
}

.btn-primary:hover {
    background-color: var(--primary-300);
    transform: translateY(-2px);
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-400);
    color: var(--primary-400);
}

.btn-outline:hover {
    background: rgba(56, 189, 248, 0.1);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

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

.btn-block {
    width: 100%;
}

.btn-glow {
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

.btn-pulse {
    animation: pulse-blue 2s infinite;
}

@keyframes pulse-blue {
    0% {
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(56, 189, 248, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
    }
}

.glass-pill {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 9999px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 1rem;
}

/* Base Section Mobile Adjustments */
section {
    padding: var(--section-spacing-mobile) 0;
    overflow: hidden;
}

@media (min-width: 769px) {
    section {
        padding: 6rem 0;
    }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(56, 189, 248, 0.1);
    padding: 0.75rem 0;
}

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

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

.nav-links a {
    font-weight: 500;
    color: var(--text-secondary);
}

.nav-links a:hover {
    color: var(--primary-400);
}

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

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-primary);
    transition: var(--transition);
}

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

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-label {
    display: inline-block;
    color: var(--primary-400);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: 4.75rem;
    /* 76px */
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

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

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-image {
    width: 100%;
    max-width: 600px;
    animation: float 6s ease-in-out infinite;
    z-index: 2;
}

.visual-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--primary-400);
    filter: blur(100px);
    opacity: 0.2;
    border-radius: 50%;
    z-index: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Social Proof */
.social-proof {
    padding: 2rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.badges-row {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.badge {
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: var(--primary-50);
    font-family: var(--font-mono);
}

/* Services */
.services {
    padding: 6rem 0;
    background-color: var(--bg-secondary);
}

.section-title {
    font-size: 3rem;
    margin-bottom: 3rem;
    text-align: center;
}

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

.flip-card {
    background-color: transparent;
    height: 300px;
    /* Fixed height for homogeneity */
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 1rem;
    overflow: hidden;
}

.flip-card-front {
    background-color: var(--bg-tertiary);
    display: flex;
    align-items: flex-end;
    /* Title at bottom */
}

.flip-card-front img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.8;
}

.card-overlay {
    position: relative;
    z-index: 2;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    width: 100%;
    padding: 1.5rem;
    text-align: left;
}

.card-overlay h3 {
    margin: 0;
    font-size: 1.25rem;
}

.flip-card-back {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    border: 1px solid var(--primary-900);
}

.flip-card-back h3 {
    color: var(--primary-400);
    margin-bottom: 1rem;
}

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

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.tag {
    background: rgba(56, 189, 248, 0.1);
    color: var(--primary-300);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

/* Dashboard Metrics */
.dashboard-metrics {
    padding: 4rem 0;
    background: radial-gradient(circle at center, rgba(12, 74, 110, 0.3) 0%, rgba(0, 0, 0, 1) 70%);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.metric-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-400);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

.metric-label {
    display: block;
    color: var(--text-tertiary);
    font-size: 1rem;
    font-weight: 500;
}

/* Lead Capture Form */
.lead-capture {
    padding: 6rem 0;
    background-color: var(--bg-primary);
    position: relative;
}

.form-card {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem;
    border: 1px solid rgba(56, 189, 248, 0.3);
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.1);
}

.form-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.form-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.form-header p {
    color: var(--text-secondary);
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-400);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

textarea {
    resize: vertical;
}

.form-status {
    margin-top: 1rem;
    text-align: center;
    font-weight: 500;
    min-height: 1.5rem;
}

.form-status.success {
    color: #4ade80;
}

.form-status.error {
    color: #f87171;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(56, 189, 248, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-400);
    animation: spin 1s ease-in-out infinite;
    margin-right: 0.5rem;
    vertical-align: middle;
}

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

/* About Section */
.about-section {
    padding: 6rem 0;
    background-color: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-400);
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.2);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fallback-avatar {
    display: none;
    width: 100%;
    height: 100%;
    background: var(--bg-tertiary);
    color: var(--primary-400);
    font-size: 5rem;
    font-weight: 700;
    align-items: center;
    justify-content: center;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

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

.skills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.skill-tag {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.link-arrow {
    color: var(--primary-400);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.link-arrow:hover {
    gap: 0.8rem;
}

/* CTA Final */
.cta-final {
    padding: 6rem 0;
    text-align: center;
    background: radial-gradient(circle at center, rgba(2, 132, 199, 0.2) 0%, rgba(0, 0, 0, 1) 70%);
}

.cta-final h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.cta-final p {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-size: 1.25rem;
}

.whatsapp-direct {
    margin-top: 2rem;
    font-size: 1rem;
    color: var(--text-tertiary);
}

.whatsapp-direct a {
    color: var(--primary-400);
    font-weight: 600;
}

/* Footer */
.footer {
    padding: 4rem 0 2rem;
    background-color: var(--bg-tertiary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3rem;
}

.footer-brand {
    max-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-logo {
    height: 48px;
    width: auto;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.4s ease;
}

.footer-logo:hover {
    transform: scale(1.1) translateY(-2px);
    filter: drop-shadow(0 4px 8px rgba(56, 189, 248, 0.4));
}

.footer-logo.animate-spin {
    animation: simpleSpin 0.6s ease-in-out;
}

@keyframes simpleSpin {
    0% {
        transform: scale(1) rotate(0deg);
    }

    50% {
        transform: scale(1.2) rotate(180deg);
        filter: drop-shadow(0 0 15px var(--primary-400));
    }

    100% {
        transform: scale(1) rotate(360deg);
    }
}

.copyright {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.footer-links .col {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.footer-links a {
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--primary-400);
}

/* Particles Container */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--primary-400);
    opacity: 0.3;
    animation: rise var(--duration) linear infinite;
    bottom: -20px;
}

@keyframes rise {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }

    20% {
        opacity: 0.5;
    }

    80% {
        opacity: 0.5;
    }

    100% {
        transform: translateY(calc(-100vh - 50px)) translateX(var(--drift));
        opacity: 0;
    }
}

/* Mobile Menu Overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
}

.mobile-nav-overlay.open {
    display: flex;
}

.mobile-nav-overlay a {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    transition: var(--transition);
}

.mobile-nav-overlay a:hover {
    color: var(--primary-400);
}

.mobile-nav-overlay .close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

/* Mobile menu active state */
.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Hero fallback visual */
.hero-visual-fallback {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-visual-fallback svg {
    width: 100%;
    height: 100%;
    animation: float 6s ease-in-out infinite;
}

/* Flip card mobile active state */
.flip-card-inner.flipped-active {
    transform: rotateY(180deg);
}

/* Select dark option fix */
select option {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.3s;
}

.reveal-delay-4 {
    transition-delay: 0.4s;
}

/* Digitalizacion Section */
#digitalizacion {
    padding: 6rem 0;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

#digitalizacion::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.digitalizacion-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.digitalizacion-text h2 {
    font-size: 2.75rem;
    margin-bottom: 1.5rem;
}

.digitalizacion-text p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.digitalizacion-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 12px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.step-content h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.step-content p {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    margin: 0;
}

.digitalizacion-visual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.platform-card {
    background: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    cursor: default;
}

.platform-card:hover {
    border-color: rgba(56, 189, 248, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.1);
}

.platform-card .platform-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.platform-card .platform-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding-top: 2rem;
        text-align: center;
    }

    .hero-subtitle {
        margin: 0 auto 2rem;
    }

    .hero-actions {
        justify-content: center;
        flex-direction: column;
    }

    .nav-links,
    .navbar .btn {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .form-card {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }

    .skills-row {
        justify-content: center;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-links {
        gap: 2rem;
        flex-direction: column;
    }

    .digitalizacion-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .digitalizacion-visual {
        grid-template-columns: 1fr 1fr;
    }

    .section-title {
        font-size: 2rem;
    }

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

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

    .cta-final h2 {
        font-size: 2rem;
    }
}

/* ==========================================================================
   HERO MINIMALISTA (SCOPED)
   ========================================================================== */
#hero.hero-minimal {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
}

#hero .hero-bg-network {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(circle at center, rgba(56, 189, 248, 0.08) 0%, transparent 60%);
}

#hero .hero-minimal-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding: 0 1.25rem;
    animation: heroFadeIn 1.3s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#hero .brand-sigla {
    font-family: var(--font-mono, monospace);
    color: var(--text-tertiary);
    font-size: clamp(0.7rem, 3vw, 0.95rem);
    letter-spacing: 0.5em;
    /* Máss espacio, más futurista */
    font-weight: 500;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
    margin-bottom: 0.5rem;
}

#hero .brand-sigla .highlight {
    color: var(--primary-400);
    font-weight: 700;
}

#hero .brand-name {
    font-family: var(--font-sans, system-ui, sans-serif);
    margin: 0;
    text-transform: uppercase;
    line-height: 0.85;
    text-align: center;
    position: relative;

    /* Animación Metálica - Invocación / Construcción Futurista */
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.8) 0%,
            #94a3b8 20%,
            #38bdf8 50%,
            /* Flujo de inducción */
            #94a3b8 80%,
            rgba(255, 255, 255, 0.8) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: metallicShine 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

#hero .brand-name .first-name {
    display: block;
    font-size: clamp(4.5rem, 18vw, 7.5rem);
    font-weight: 900;
    letter-spacing: -0.04em;
}

#hero .brand-name .last-name {
    display: block;
    font-size: clamp(1.1rem, 4vw, 1.8rem);
    /* Mayor que la sigla, menor que ERICK */
    font-weight: 300;
    letter-spacing: clamp(0.2em, 4vw, 0.4em);
    /* Ajuste dinámico para móvil */
    color: rgba(255, 255, 255, 0.9);
    /* Blanco nítido */
    opacity: 1;
    margin-top: 0.6rem;
    padding: 0;
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
    /* Resalte futurista extra */
}

@keyframes metallicShine {
    to {
        background-position: 200% center;
    }
}

#hero .brand-phrase {
    font-family: var(--font-sans, system-ui, sans-serif);
    font-size: clamp(0.95rem, 2.5vw, 1.2rem);
    color: var(--text-secondary, #E4E4E7);
    font-weight: 300;
    max-width: 46ch;
    margin: 1.5rem auto 0;
    line-height: 1.6;
    letter-spacing: 0.05em;
}

#hero .brand-phrase .highlight {
    color: var(--text-primary);
    font-weight: 600;
    border-bottom: 1px solid var(--primary-400);
}

/* Scroll cue (sin texto) */
#hero .scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    z-index: 2;
}

#hero .scroll-indicator .chevron {
    width: 14px;
    height: 14px;
    border-right: 2px solid var(--primary-400, #38bdf8);
    border-bottom: 2px solid var(--primary-400, #38bdf8);
    transform: rotate(45deg);
    animation: chevronDown 1.9s infinite cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

#hero .scroll-indicator .chevron:nth-child(1) {
    animation-delay: 0s;
}

#hero .scroll-indicator .chevron:nth-child(2) {
    animation-delay: 0.15s;
}

#hero .scroll-indicator .chevron:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes chevronDown {
    0% {
        opacity: 0;
        transform: rotate(45deg) translate(-5px, -5px);
    }

    45% {
        opacity: 0.75;
    }

    100% {
        opacity: 0;
        transform: rotate(45deg) translate(6px, 6px);
    }
}

@keyframes heroPulse {
    from {
        text-shadow: 0 0 6px rgba(56, 189, 248, 0.18);
    }

    to {
        text-shadow: 0 0 18px rgba(56, 189, 248, 0.55);
    }
}

/* Mobile safety: evita que el indicador tape contenido */
@media (max-height: 700px) {
    #hero .scroll-indicator {
        bottom: 1.5rem;
    }
}

/* ==========================================================================
   SECCIÓN ECOSISTEMA REFINADA (SITIO WEB Y APPS)
   ========================================================================== */
.eco-section {
    padding: 8rem 0;
    min-height: 100vh;
    display: block;
    background-color: transparent;
    background-image: radial-gradient(circle at center, rgba(56, 189, 248, 0.02) 1px, transparent 1px);
    background-size: 24px 24px;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.eco-heading {
    margin-bottom: 3rem;
}

.eco-heading .section-title {
    margin-bottom: 0;
}

/* Ambient Glows Detrás de las Cards */
.eco-section::before,
.eco-section::after {
    content: '';
    position: absolute;
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.09) 0%, rgba(14, 165, 233, 0.03) 40%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    filter: blur(80px);
    animation: ecoGlowFloat 16s ease-in-out infinite alternate;
    pointer-events: none;
}

.eco-section::before {
    top: -15%;
    left: -10%;
}

.eco-section::after {
    bottom: -15%;
    right: -10%;
    animation-delay: -8s;
}

@keyframes ecoGlowFloat {
    from {
        transform: translate(var(--mx, 0px), var(--my, 0px)) scale(1);
    }

    to {
        transform: translate(calc(5% + var(--mx, 0px)), calc(5% + var(--my, 0px))) scale(1.1);
    }
}

.eco-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: stretch;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
}

.eco-container.visible {
    opacity: 1;
    transform: translateY(0);
}

.eco-card {
    display: block;
    text-decoration: none;
    background: rgba(9, 9, 11, 0.6);
    backdrop-filter: blur(12px);
    border-radius: 2rem;
    padding: 3.5rem;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Borde Vivo + Shine Effect */
@property --eco-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes ecoBorderRotate {
    0% {
        --eco-angle: 0deg;
    }

    100% {
        --eco-angle: 360deg;
    }
}

.eco-web:hover {
    border-color: var(--primary-400);
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.2);
}

/* --- Web Mockup Visual Elements --- */
.web-mockup-container {
    position: relative;
    margin-top: 2rem;
    height: 180px;
    width: 260px;
    perspective: 1000px;
    z-index: 2;
}

.browser-frame {
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transform: rotateX(10deg) rotateY(-10deg);
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.eco-web:hover .browser-frame {
    transform: rotateX(0) rotateY(0) scale(1.05);
}

.browser-header {
    height: 24px;
    background: rgba(30, 41, 59, 0.9);
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.dot.red {
    background: #ef4444;
}

.dot.yellow {
    background: #eab308;
}

.dot.green {
    background: #22c55e;
}

.search-bar {
    margin-left: 10px;
    font-family: var(--font-mono);
    font-size: 8px;
    color: var(--text-tertiary);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
    flex-grow: 1;
    text-align: left;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.search-bar::after {
    content: '';
    position: absolute;
    right: 0;
    width: 2px;
    height: 100%;
    background: var(--primary-400);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.browser-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: mockScroll 10s infinite ease-in-out;
}

@keyframes mockScroll {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.mock-nav {
    height: 8px;
    width: 40%;
    background: rgba(56, 189, 248, 0.2);
    border-radius: 4px;
    align-self: flex-end;
}

.mock-hero {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mock-line-long {
    height: 10px;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.mock-line-short {
    height: 10px;
    width: 60%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.mock-grid {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.mock-box {
    width: 30%;
    height: 40px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 6px;
    animation: mockBoxPulse 3s infinite alternate;
}

.mock-box:nth-child(2) {
    animation-delay: 0.5s;
}

.mock-box:nth-child(3) {
    animation-delay: 1s;
}

@keyframes mockBoxPulse {
    from {
        background: rgba(56, 189, 248, 0.1);
    }

    to {
        background: rgba(56, 189, 248, 0.3);
    }
}

.web-floating-element {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 48px;
    height: 48px;
    background: var(--primary-400);
    color: #0f172a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px var(--accent-glow);
    animation: floatMove 4s ease-in-out infinite;
    z-index: 3;
}

@keyframes floatMove {

    0%,
    100% {
        transform: translateY(0) scale(1.1);
    }

    50% {
        transform: translateY(-15px) scale(0.95);
    }
}

/* --- App Mockup Visual Elements --- */
.app-mockup-container {
    position: relative;
    margin-top: 2rem;
    height: 180px;
    width: 220px;
    perspective: 1000px;
    z-index: 2;
}

.phone-frame {
    width: 130px;
    height: 240px;
    background: #0f172a;
    border: 4px solid #1e293b;
    border-radius: 24px;
    position: relative;
    margin: 0 auto;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    transform: rotateX(15deg) rotateY(15deg) translateY(-20px);
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.eco-apps:hover .phone-frame {
    transform: rotateX(0deg) rotateY(0deg) translateY(-30px) scale(1.05);
}

.phone-header {
    height: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 5px;
}

.phone-notch {
    width: 40px;
    height: 10px;
    background: #1e293b;
    border-radius: 0 0 8px 8px;
}

.phone-body {
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.app-chat-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chat-msg {
    height: 8px;
    border-radius: 4px;
    width: 100%;
}

.chat-msg.bot {
    background: rgba(56, 189, 248, 0.2);
    width: 70%;
}

.chat-msg.user {
    background: rgba(255, 255, 255, 0.1);
    width: 60%;
    align-self: flex-end;
}

.chat-msg.bot.animated {
    background: rgba(56, 189, 248, 0.4);
    width: 40%;
    animation: typing 2s infinite alternate;
}

@keyframes typing {
    from {
        opacity: 0.3;
        transform: scaleX(0.8);
    }

    to {
        opacity: 1;
        transform: scaleX(1);
    }
}

.app-stats-grid {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 60px;
    padding-top: 10px;
}

.stat-bar {
    width: 18%;
    height: var(--h);
    background: var(--primary-400);
    border-radius: 3px 3px 0 0;
    opacity: 0.6;
    animation: statGrow 4s infinite ease-in-out alternate;
}

@keyframes statGrow {

    0%,
    100% {
        height: var(--h);
        opacity: 0.6;
    }

    50% {
        height: calc(var(--h) * 1.2);
        opacity: 1;
    }
}

.phone-home-line {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

/* Floating automation nodes */
.node-float {
    position: absolute;
    padding: 4px 8px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--primary-400);
    border-radius: 8px;
    font-size: 10px;
    font-family: var(--font-mono);
    color: var(--primary-400);
    backdrop-filter: blur(4px);
    z-index: 3;
}

.node-ai {
    top: 20px;
    right: 0;
    animation: floatNode1 5s infinite;
}

.node-n8n {
    bottom: 40px;
    left: -10px;
    animation: floatNode2 6s infinite;
}

.node-data {
    top: 80px;
    left: 10px;
    animation: floatNode3 7s infinite;
}

@keyframes floatNode1 {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(10px, -15px);
    }
}

@keyframes floatNode2 {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-10px, 15px);
    }
}

@keyframes floatNode3 {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(15px, 10px);
    }
}

/* Responsividad para la maqueta móvil */
@media (max-width: 480px) {
    .app-mockup-container {
        width: 100%;
        max-width: 200px;
    }
}

.eco-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.3), transparent 40%, rgba(56, 189, 248, 0.1));
    background: conic-gradient(from var(--eco-angle), transparent 60%, rgba(56, 189, 248, 0.4) 80%, transparent 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: opacity 0.6s ease;
    animation: ecoBorderRotate 8s linear infinite;
    pointer-events: none;
    opacity: 0.7;
}

.eco-card:hover::before {
    background: conic-gradient(from var(--eco-angle), transparent 50%, var(--primary-400) 80%, transparent 100%);
    opacity: 1;
    animation-duration: 4s;
}

/* Shine Sweep */
.eco-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
    transform: skewX(-20deg);
    transition: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.eco-card:hover::after {
    left: 150%;
}

.eco-card:hover {
    border-color: rgba(56, 189, 248, 0.2);
    transform: translateY(-12px) scale(1.01);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6), 0 0 25px rgba(56, 189, 248, 0.15);
}

.eco-badge {
    display: inline-block;
    font-family: var(--font-mono);
    color: var(--primary-400);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.eco-card h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 2.5rem;
    color: #fff;
    font-weight: 800;
}

/* Apps Grid Dinámico */
.eco-grid-apps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin-top: auto;
}

.eco-tile {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0.8rem;
    padding: 0.8rem 0.5rem;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-tertiary);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: tileIdle 6s ease-in-out infinite;
}

.eco-tile:nth-child(2) {
    animation-delay: 1s;
}

.eco-tile:nth-child(3) {
    animation-delay: 2s;
}

.eco-tile:nth-child(4) {
    animation-delay: 3s;
}

.eco-tile:nth-child(5) {
    animation-delay: 4s;
}

.eco-tile:nth-child(6) {
    animation-delay: 5s;
}

@keyframes tileIdle {

    0%,
    100% {
        transform: translateY(0);
        box-shadow: 0 0 0 transparent;
    }

    50% {
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(56, 189, 248, 0.04);
    }
}

.eco-tile:hover {
    color: var(--primary-400);
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(56, 189, 248, 0.08);
    transform: translateY(2px) !important;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.15) !important;
    animation-play-state: paused;
}

.eco-icon-wrapper {
    color: var(--primary-400);
    margin-top: auto;
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.3));
    transition: 0.5s ease;
}

.eco-card:hover .eco-icon-wrapper {
    transform: translateX(15px) scale(1.1);
}

@media (max-width: 991px) {
    .eco-heading {
        margin-bottom: 2rem;
    }

    .eco-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .eco-section {
        padding: var(--section-spacing-mobile) 0;
        height: auto;
    }

    .eco-card {
        padding: 2rem;
        border-radius: 1.5rem;
    }

    .eco-card h2 {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .eco-grid-apps {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }
}

/* ==========================================================================
   SECCIÓN EDUCACIÓN
   ========================================================================== */
.edu-section {
    padding: 8rem 0;
    min-height: 100vh;
    min-height: 100svh;
    display: block;
    background-color: transparent;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* Ambient Glow */
.edu-section::before {
    content: '';
    position: absolute;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.05) 0%, transparent 60%);
    border-radius: 50%;
    z-index: -1;
    filter: blur(80px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: eduGlowPulse 16s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes eduGlowPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.7;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
}

.edu-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
    width: 100%;
    max-width: 1000px;
}

.edu-card {
    position: relative;
    background: rgba(9, 9, 11, 0.6);
    backdrop-filter: blur(12px);
    border-radius: 1.5rem;
    padding: 3rem 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow: hidden;
}

/* Borde Animado */
@property --edu-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes eduBorderRotate {
    0% {
        --edu-angle: 0deg;
    }

    100% {
        --edu-angle: 360deg;
    }
}

.edu-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), transparent 40%, rgba(56, 189, 248, 0.05));
    background: conic-gradient(from var(--edu-angle), transparent 60%, rgba(56, 189, 248, 0.3) 80%, transparent 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: opacity 0.6s ease;
    animation: eduBorderRotate 10s linear infinite;
    pointer-events: none;
    opacity: 0.6;
}

/* Hover Desktop */
@media (hover: hover) {
    .edu-card:hover {
        transform: translateY(-8px);
        border-color: rgba(56, 189, 248, 0.15);
        box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(56, 189, 248, 0.1);
    }

    .edu-card:hover::before {
        background: conic-gradient(from var(--edu-angle), transparent 50%, var(--primary-400) 80%, transparent 100%);
        opacity: 1;
        animation-duration: 4s;
    }
}

.edu-card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.edu-logo {
    height: 48px;
    width: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.05));
}

.edu-card h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.edu-inst {
    color: var(--text-tertiary);
    font-size: 0.95rem;
    margin-bottom: 3rem;
    font-family: var(--font-mono);
}

/* Timeline Minimalista */
.edu-timeline {
    margin-top: auto;
}

.edu-line-container {
    display: flex;
    align-items: center;
    position: relative;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

.edu-line,
.edu-line-dashed {
    flex-grow: 1;
    height: 1px;
    margin: 0 0.5rem;
}

.edu-line {
    background: rgba(255, 255, 255, 0.08);
    /* Fondo más sutil */
    position: relative;
    overflow: hidden;
}

.edu-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--primary-400), #fff, var(--primary-400), transparent);
    box-shadow: 0 0 15px var(--primary-400);
    transition: left 1.2s cubic-bezier(0.65, 0, 0.35, 1);
}

.edu-line.completed::after {
    left: 100%;
}

/* Estado final sólido tras el paso del 'láser' */
.edu-line.completed {
    background: var(--primary-400);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
    transition: background 0.8s ease 0.6s;
}

.edu-line-dashed {
    background: transparent;
    border-top: 1px dashed rgba(56, 189, 248, 0.4);
}

.edu-node {
    width: 6px;
    height: 6px;
    background: var(--text-tertiary);
    border-radius: 50%;
    flex-shrink: 0;
}

.edu-node-active {
    background: var(--primary-400);
    box-shadow: 0 0 10px var(--primary-400);
}

.edu-dates {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.edu-dates span {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.edu-active-text {
    color: var(--primary-400) !important;
    border-color: rgba(56, 189, 248, 0.3) !important;
    background: rgba(56, 189, 248, 0.08) !important;
}

@media (prefers-reduced-motion: reduce) {

    .eco-section::before,
    .eco-section::after,
    .eco-card,
    .eco-tile,
    .edu-section::before,
    .edu-card::before,
    .eco-container {
        animation: none;
        transition: none;
        transform: none;
    }
}

.edu-heading {
    margin-bottom: 3rem;
    text-align: center;
}

.edu-heading .section-title {
    margin-bottom: 0;
}

.edu-card-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.08) 0%, transparent 70%);
    opacity: 0.5;
    z-index: 1;
    transition: opacity 0.5s ease;
}

.edu-glow-active {
    background: radial-gradient(circle at 100% 100%, rgba(56, 189, 248, 0.15) 0%, transparent 60%);
    animation: eduGlowBreathe 4s ease-in-out infinite alternate;
}

@keyframes eduGlowBreathe {
    0% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

.edu-line-dashed-container {
    flex-grow: 1;
    height: 1px;
    margin: 0 0.5rem;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.edu-line-dashed-container .edu-line-dashed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(90deg,
            transparent,
            transparent 10px,
            var(--primary-400) 10px,
            var(--primary-400) 20px);
    opacity: 0.3;
    animation: eduDashedFlow 2s linear infinite;
}

/* Efecto de pulso láser intermitente (Data Flow) */
.edu-line-dashed-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            var(--primary-400),
            #fff,
            transparent);
    filter: blur(2px);
    animation: eduPulseLaser 3s cubic-bezier(0.4, 0, 0.7, 1) infinite;
}

@keyframes eduDashedFlow {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 40px 0;
    }
}

@keyframes eduPulseLaser {
    0% {
        left: -100%;
        opacity: 0;
    }

    30% {
        opacity: 1;
    }

    60% {
        left: 100%;
        opacity: 0;
    }

    100% {
        left: 100%;
        opacity: 0;
    }
}

.node-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid var(--primary-400);
    opacity: 0;
    animation: nodePulseAnim 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes nodePulseAnim {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }

    100% {
        transform: scale(3.5);
        opacity: 0;
    }
}

/* ==========================================================================
   SECCIÓN CERTIFICACIONES (HIGH-END)
   ========================================================================== */
.marquee-overdrive {
    position: relative;
    padding: 8rem 0;
    overflow: hidden;
    background-color: var(--bg-primary);
}

/* Fixed Mesh Gradient */
.cert-mesh-bg {
    position: absolute;
    inset: -50%;
    background:
        radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(239, 68, 68, 0.03) 0%, transparent 30%),
        radial-gradient(circle at 20% 80%, rgba(234, 179, 8, 0.03) 0%, transparent 30%);
    background-size: 100% 100%;
    z-index: 0;
    pointer-events: none;
    transition: transform 0.1s linear;
    will-change: transform;
}

/* Local Particles */
.cert-particles {
    position: absolute;
    inset: -10%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 1;
    pointer-events: none;
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* Marquee Container Mask */
.marquee-container {
    width: 100%;
    overflow: hidden;
    padding: 2rem 0;
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.marquee-track {
    display: flex;
    gap: 2rem;
    width: max-content;
    animation: marqueeScroll 25s linear infinite;
    will-change: transform;
}

.marquee-track:hover {
    animation-play-state: paused;
}

@keyframes marqueeScroll {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(calc(-50% - 1rem), 0, 0);
    }
}

/* 3D Fold Entrance */
.reveal-3d {
    opacity: 0;
    transform: perspective(1000px) rotateX(90deg) translateY(50px);
    transform-origin: top center;
    transition: transform 1.2s cubic-bezier(0.68, -0.55, 0.27, 1.55), opacity 0.8s ease-out;
}

.reveal-3d.active {
    opacity: 1;
    transform: perspective(1000px) rotateX(0deg) translateY(0);
}

/* Cert Badges */
.cert-badge {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.2rem 1.8rem;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 20px;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: floatCert 6s ease-in-out infinite;
    will-change: transform;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.1s;
    cursor: default;
    min-width: 380px;
}

@keyframes floatCert {

    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }

    50% {
        transform: translate3d(0, -10px, 0);
    }
}

/* Category Colors */
.cat-ai {
    border-left: 4px solid #38bdf8;
}

/* Cyan */
.cat-data {
    border-left: 4px solid #eab308;
}

/* Gold */
.cat-security {
    border-left: 4px solid #ef4444;
}

/* Red */
.cat-tech {
    border-left: 4px solid #a855f7;
}

/* Purple */
.cat-pro {
    border-left: 4px solid #10b981;
}

/* Green */

.cat-ai:hover {
    border-color: #38bdf8;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}

.cat-data:hover {
    border-color: #eab308;
    box-shadow: 0 0 20px rgba(234, 179, 8, 0.2);
}

.cat-security:hover {
    border-color: #ef4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}

.cat-tech:hover {
    border-color: #a855f7;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
}

.cat-pro:hover {
    border-color: #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.cert-icon {
    font-size: 2rem;
    background: rgba(255, 255, 255, 0.05);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.cert-cat {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
}

.cert-info h4 {
    margin: 0.2rem 0 0;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
}

@media (max-width: 768px) {
    .cert-badge {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        min-width: 300px;
    }

    .cert-particles {
        display: none;
    }
}

/* ─── BLOG SECTION PREMIUM ─── */
.blog-section {
    padding: 6rem 0;
    position: relative;
    background: transparent;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    min-height: 200px;
}

@media (max-width: 991px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.blog-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    text-decoration: none;
    height: 100%;
    position: relative;
    transform: translateY(20px);
    opacity: 0;
}

.blog-card.visible {
    transform: translateY(0);
    opacity: 1;
}

.blog-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px var(--accent-glow);
    border-color: rgba(56, 189, 248, 0.3);
}

.blog-thumb {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
}

.blog-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover .blog-thumb img {
    transform: scale(1.05);
}

.blog-thumb-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, rgba(12, 74, 110, 0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-400);
}

.blog-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-meta {
    font-size: 0.8rem;
    color: var(--primary-400);
    margin-bottom: 0.75rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.blog-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-excerpt {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.blog-read-more {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-400);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    margin-top: auto;
}

.blog-card:hover .blog-read-more {
    gap: 0.75rem;
}

.blog-loader {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
    padding: 2rem 0;
    font-family: var(--font-mono);
}

/* ==========================================================================
   SECCIÓN CERTIFICACIONES OVERDRIVE (DOBLE CINTA + GLOW + SCRAMBLE)
   ========================================================================== */
.cert-overdrive-section {
    position: relative;
    padding: 8rem 0;
    overflow: hidden;
    background-color: transparent;
}

/* Digital Grid */
.cert-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(56, 189, 248, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center center;
    z-index: 0;
    opacity: 0.3;
}

/* Laser Scan Line */
.cert-laser-scan {
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(56, 189, 248, 0.5);
    box-shadow: 0 0 20px 2px rgba(56, 189, 248, 0.6);
    z-index: 1;
    animation: laserScan 8s linear infinite;
    pointer-events: none;
    opacity: 0.7;
}

@keyframes laserScan {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(800px);
        opacity: 0;
    }
}

.cert-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0.5rem auto 0;
    letter-spacing: 0.5px;
}

/* Double Marquee */
.marquee-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 2rem 0;
    position: relative;
    z-index: 2;
}

.marquee-container {
    width: 100%;
    overflow: hidden;
    padding: 1rem 0;
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.reverse-mask {
    -webkit-mask-image: linear-gradient(to left, transparent, black 15%, black 85%, transparent);
    mask-image: linear-gradient(to left, transparent, black 15%, black 85%, transparent);
}

.marquee-track {
    display: flex;
    gap: 2rem;
    width: max-content;
    will-change: transform;
}

.track-left {
    animation: marqueeLeft 20s linear infinite;
}

.track-right {
    animation: marqueeRight 20s linear infinite;
    transform: translate3d(calc(-50% - 1rem), 0, 0);
}

/* Pause on hover on both tracks */
.marquee-wrapper:hover .marquee-track {
    animation-play-state: paused;
}

@keyframes marqueeLeft {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(calc(-50% - 1rem), 0, 0);
    }
}

@keyframes marqueeRight {
    0% {
        transform: translate3d(calc(-50% - 1rem), 0, 0);
    }

    100% {
        transform: translate3d(0, 0, 0);
    }
}

/* Glass Pills Premium */
.premium-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 50px;
    /* Pill shape */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(56, 189, 248, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
    cursor: default;
}

.premium-badge:hover {
    border-color: var(--primary-400);
    background: rgba(56, 189, 248, 0.1);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
    transform: scale(1.05);
}

.cert-cat-num {
    background: var(--primary-400);
    color: #0f172a;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
}

/* CTA Botón Extremo */
.btn-glow-extreme {
    display: inline-block;
    padding: 1.2rem 2.8rem;
    background: transparent;
    border: 2px solid var(--primary-400);
    color: var(--primary-400);
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
    position: relative;
    z-index: 10;
    text-decoration: none;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.2), inset 0 0 10px rgba(56, 189, 248, 0.1);
    animation: btnPulseExtreme 3s infinite;
}

.btn-glow-extreme::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(56, 189, 248, 0.4), transparent);
    transition: all 0.6s;
    z-index: -1;
}

.btn-glow-extreme:hover {
    background: var(--primary-400);
    color: #0f172a;
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.btn-glow-extreme:hover::before {
    left: 100%;
}

@keyframes btnPulseExtreme {
    0% {
        box-shadow: 0 0 15px rgba(56, 189, 248, 0.2), inset 0 0 10px rgba(56, 189, 248, 0.1);
    }

    50% {
        box-shadow: 0 0 30px rgba(56, 189, 248, 0.5), inset 0 0 15px rgba(56, 189, 248, 0.2);
    }

    100% {
        box-shadow: 0 0 15px rgba(56, 189, 248, 0.2), inset 0 0 10px rgba(56, 189, 248, 0.1);
    }
}

/* ==========================================================================
   SECCIÓN CONTACTO: HABLAR CONMIGO (NODO)
   ========================================================================== */
.hablar-conmigo-node {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-primary);
    overflow: hidden;
    padding: 6rem 0;
}

/* Static Mesh & Radial Focus */
.node-mesh-bg {
    position: absolute;
    inset: 0;
    min-height: 100%;
    background-image:
        radial-gradient(circle at center, rgba(56, 189, 248, 0.08) 0%, transparent 50%),
        linear-gradient(rgba(56, 189, 248, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 30px 30px, 30px 30px;
    z-index: 0;
    pointer-events: none;
}

.node-container {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
}

/* Typography Overrides */
.node-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.node-desc {
    color: var(--text-secondary);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto 4rem;
    line-height: 1.6;
}

/* Identity Grid & Orbital Ring */
.node-identity-grid {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
    padding: 3rem;
}

.orbital-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 380px;
    height: 380px;
    margin-top: -190px;
    margin-left: -190px;
    border: 1px dashed rgba(56, 189, 248, 0.15);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    animation: orbitRotate 50s linear infinite;
    /* 0.02Hz */
}

.orbital-ring::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    width: 6px;
    height: 6px;
    background: var(--primary-400);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-400);
}

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

/* The Connection Nodes (Links) */
.node-link {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    text-decoration: none;
    z-index: 2;
    group: "node";
}

.node-glass {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.node-icon {
    width: 32px;
    height: 32px;
    color: var(--text-primary);
    transition: color 0.3s ease;
    filter: drop-shadow(0 0 0 transparent);
}

.node-text {
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 4px;
    transition: color 0.3s ease;
}

/* Hover Micro-interactions */
.node-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--primary-400);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.node-link:hover .node-glass {
    background: rgba(56, 189, 248, 0.05);
    border-color: rgba(56, 189, 248, 0.3);
    transform: translateY(-8px);
}

.node-link:hover .node-icon {
    color: var(--primary-400);
    filter: drop-shadow(0 0 8px var(--primary-400));
}

.node-link:hover .node-text {
    color: var(--primary-400);
}

.node-link:hover::after {
    transform: scaleX(1);
}

@media (max-width: 768px) {
    .node-identity-grid {
        gap: 2rem;
        padding: 1.5rem;
    }

    .orbital-ring {
        width: 280px;
        height: 280px;
        margin-top: -140px;
        margin-left: -140px;
    }

    .node-glass {
        width: 65px;
        height: 65px;
        border-radius: 16px;
    }

    .node-icon {
        width: 26px;
        height: 26px;
    }
}

/* ==========================================================================
   SECCIÓN 6: PERFIL PROFESIONAL (SOBRE MÍ)
   ========================================================================== */
.profile-premium {
    padding: 8rem 0;
    min-height: 100vh;
    min-height: 100svh;
    background-color: var(--bg-primary);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.profile-premium-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 5rem;
    align-items: center;
}

/* LEFT COLUMN - CONTENT */
.profile-premium-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.profile-dynamic-title {
    display: flex;
    align-items: baseline;
    overflow: hidden;
}

.primary-accent {
    color: var(--primary-400);
}

.collapsible-part {
    display: inline-block;
    max-width: 300px;
    opacity: 1;
    white-space: pre;
    transition: max-width 1s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.6s ease,
        margin 0.6s ease;
}

.profile-dynamic-title.collapsed .collapsible-part {
    max-width: 0;
    opacity: 0;
    margin: 0;
}


.profile-subtitle {
    color: var(--text-secondary);
    font-size: 1.25rem;
    font-weight: 500;
    margin-top: -0.5rem;
    margin-bottom: 2rem;
    font-family: var(--font-mono);
}

.profile-narrative {
    color: var(--text-secondary);
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 3.5rem;
    max-width: 90%;
    min-height: 120px;
    /* Evita saltos de layout durante la escritura */
}

.typewriter-js::after {
    content: '_';
    color: var(--primary-400);
    animation: cursorBlink 1s step-end infinite;
    font-weight: 900;
}

@keyframes cursorBlink {
    50% {
        opacity: 0;
    }
}


/* DASHBOARD METRICS */
.profile-metrics {
    display: flex;
    gap: 3rem;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 16px;
    padding: 2rem 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 3.5rem;
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.metric-value {
    color: var(--primary-400);
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.metric-label {
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* LINK ARROW */
.profile-link-arrow {
    display: inline-flex;
    align-items: center;
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.3s ease;
    width: max-content;
}

.profile-link-arrow:hover {
    color: var(--primary-400);
    transform: translateX(5px);
}

/* RIGHT COLUMN - VISUAL */
.profile-premium-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 2rem;
}

/* AVATAR & GLOW */
.profile-avatar-container {
    position: relative;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar-glow {
    position: absolute;
    inset: -15px;
    border-radius: 50%;
    border: 2px dashed rgba(56, 189, 248, 0.3);
    animation: profileGlowBreathe 6s ease-in-out infinite alternate, profileGlowSpin 30s linear infinite;
    z-index: 0;
}

@keyframes profileGlowBreathe {
    0% {
        box-shadow: 0 0 10px rgba(56, 189, 248, 0.1), inset 0 0 10px rgba(56, 189, 248, 0.05);
        border-color: rgba(56, 189, 248, 0.2);
        transform: scale(0.98);
    }

    100% {
        box-shadow: 0 0 30px rgba(56, 189, 248, 0.4), inset 0 0 20px rgba(56, 189, 248, 0.2);
        border-color: rgba(56, 189, 248, 0.6);
        transform: scale(1.02);
    }
}

@keyframes profileGlowSpin {
    100% {
        transform: rotate(360deg);
    }
}

.profile-avatar-container::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1;
}

.profile-avatar-img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    mask-image: radial-gradient(circle, black 60%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle, black 60%, transparent 100%);
}

.profile-signature {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--text-primary);
    opacity: 0.9;
    letter-spacing: -0.5px;
    position: relative;
}

/* RESPONSIVE */
@media (max-width: 991px) {
    .profile-premium {
        padding: var(--section-spacing-mobile) 1rem;
        height: auto;
        min-height: auto;
    }

    .profile-premium-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    /* Invert ordering for Mobile (Image first) */
    .profile-premium-visual {
        grid-row: 1;
        padding: 0;
    }

    .profile-premium-content {
        align-items: center;
    }

    .profile-narrative {
        max-width: 100%;
        font-size: 1rem;
        margin-bottom: 2.5rem;
    }

    .profile-metrics {
        flex-direction: column;
        gap: 2rem;
        padding: 2rem 1.5rem;
        width: 100%;
    }

    .profile-avatar-container {
        width: 240px;
        height: 240px;
    }

    .profile-signature {
        font-size: 1.5rem;
    }
}


/* ==========================================================================
   FONDOS PARA PORTADA Y PERFIL PROFESIONAL (IMÁGEN EN ECO)
   ========================================================================== */

/* 1. HERO - PORTADA */
.hero-bg-photo {
    position: absolute;
    inset: 0;
    z-index: 1;
    /* Por encima del network-bg, detrás del contenido */
    background-image: url('images/portada.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    /* Inicia invisible para JS */
    transform: scale(1.1);
    /* Inicia con zoom para JS */
    transition: transform 2.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 2.5s ease-out;
}

/* Oscurecimiento extra hero photo */
.hero-bg-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 2;
}

/* Sombreado a textos del Hero para resalte extremo */
#hero .hero-minimal-content .brand-phrase,
#hero .hero-minimal-content .brand-sigla {
    text-shadow: 0px 4px 15px rgba(0, 0, 0, 0.8);
}

#hero .hero-minimal-content .brand-name {
    /* Menos shadow para que destaque el gradiente animado */
    filter: drop-shadow(0px 10px 20px rgba(0, 0, 0, 0.6));
}


/* 2. SOBRE MÍ - PERFIL DESENFOCADO */
.profile-bg-blur {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: url('images/portada.png');
    background-size: cover;
    background-position: center;
    filter: blur(20px);
    opacity: 0;
    /* JS dispara el 0.3 */
    transition: opacity 2s ease-in-out;
}

.profile-bg-blur::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.6));
    z-index: 1;
}

/* 3. MOBILE FOCAL POINT FIX (FACE DETECTION) */
@media (max-width: 768px) {

    .hero-bg-photo,
    .profile-bg-blur {
        background-position: 85% center !important;
    }
}

/* ==========================================================================
   MANIFIESTO - CONSTRUCCIÓN PIXEL/ROBOT
   ========================================================================== */

.manifiesto-construction {
    padding: 10rem 0;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.construction-status {
    margin-bottom: 4rem;
}

.construction-status h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 6px;
    background: linear-gradient(90deg, #fff, var(--primary-400), #fff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: metallicShine 4s linear infinite;
}

.construction-status p {
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    letter-spacing: 3px;
    opacity: 0.8;
}

/* --- The Pixel Machine --- */
.pixel-machine-container {
    position: relative;
    width: 320px;
    height: 320px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.robot-arm {
    position: absolute;
    top: 40px;
    left: 50%;
    width: 4px;
    height: 120px;
    background: linear-gradient(to bottom, var(--primary-400), rgba(56, 189, 248, 0.2));
    transform-origin: top;
    animation: armMove 5s ease-in-out infinite;
    z-index: 5;
}

.robot-head {
    position: absolute;
    bottom: -10px;
    left: -20px;
    width: 40px;
    height: 30px;
    background: #0f172a;
    border: 2px solid var(--primary-400);
    border-radius: 6px;
    box-shadow: 0 0 15px var(--accent-glow);
}

.robot-laser {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 0;
    background: var(--primary-400);
    box-shadow: 0 0 15px var(--primary-400), 0 0 30px var(--primary-400);
    animation: laserShoot 5s ease-in-out infinite;
}

.pixel-blocks {
    position: relative;
    width: 80px;
    height: 80px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 6px;
}

.pixel-block {
    width: 100%;
    height: 100%;
    background: var(--primary-400);
    opacity: 0;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.6);
    border-radius: 2px;
}

/* Animación de secuencia de construcción */
.pixel-block:nth-child(1) {
    animation: pixelPop 5s infinite 0.3s;
}

.pixel-block:nth-child(2) {
    animation: pixelPop 5s infinite 0.6s;
}

.pixel-block:nth-child(3) {
    animation: pixelPop 5s infinite 0.9s;
}

.pixel-block:nth-child(4) {
    animation: pixelPop 5s infinite 1.8s;
}

.pixel-block:nth-child(5) {
    animation: pixelPop 5s infinite 1.5s;
}

.pixel-block:nth-child(6) {
    animation: pixelPop 5s infinite 1.2s;
}

.pixel-block:nth-child(7) {
    animation: pixelPop 5s infinite 2.1s;
}

.pixel-block:nth-child(8) {
    animation: pixelPop 5s infinite 2.4s;
}

.pixel-block:nth-child(9) {
    animation: pixelPop 5s infinite 2.7s;
}

@keyframes armMove {

    0%,
    100% {
        transform: translateX(-100px) rotate(-15deg);
    }

    50% {
        transform: translateX(100px) rotate(15deg);
    }
}

@keyframes laserShoot {

    0%,
    25% {
        height: 0;
        opacity: 0;
    }

    35% {
        height: 200px;
        opacity: 1;
    }

    75% {
        height: 200px;
        opacity: 1;
    }

    85%,
    100% {
        height: 0;
        opacity: 0;
    }
}

@keyframes pixelPop {

    0%,
    25% {
        opacity: 0;
        transform: scale(0);
    }

    45% {
        opacity: 1;
        transform: scale(1);
    }

    85% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0.6);
    }
}

.machine-glitch-text {
    margin-top: 4rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--primary-400);
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: textBlink 1.5s infinite;
}

@keyframes textBlink {

    0%,
    100% {
        opacity: 0.2;
        transform: scale(0.98);
    }

    50% {
        opacity: 1;
        transform: scale(1);
        text-shadow: 0 0 10px var(--primary-400);
    }
}

/* --- PRELOADER PREMIUM --- */
body.loading {
    overflow: hidden !important;
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-container {
    position: relative;
    z-index: 2;
}

.loader-logo {
    width: 120px;
    height: auto;
    filter: drop-shadow(0 0 20px var(--accent-glow));
    animation: logo-growth 4s cubic-bezier(0.1, 0, 0.3, 1) forwards;
    transform: scale(0.6);
    opacity: 0;
}

.loader-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    opacity: 0;
    z-index: 1;
    animation: mark-fade 4s ease-out forwards;
}

@keyframes logo-growth {
    0% {
        transform: scale(0.6);
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    100% {
        transform: scale(1.4);
        opacity: 1;
    }
}

@keyframes mark-fade {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }

    20% {
        opacity: 0.4;
    }

    100% {
        opacity: 0.1;
        transform: translate(-50%, -50%) scale(2);
    }
}

@media (max-width: 768px) {
    .loader-logo {
        width: 100px;
    }
}