/* ===================== RESET & BASE ===================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a08;
    --bg-secondary: #121210;
    --bg-card: #1a1a14;
    --bg-card-hover: #24241c;
    --text-primary: #f5f0e8;
    --text-secondary: #b0a890;
    --text-muted: #807860;
    --accent: #d4a94c;
    --accent-hover: #e6c06e;
    --accent-glow: rgba(212, 169, 76, 0.15);
    --border: #2e2a1e;
    --radius: 12px;
    --radius-lg: 20px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===================== BUTTONS ===================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: #0a0a0f;
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 30px var(--accent-glow);
}

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

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.navbar.scrolled .btn-outline {
    background: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
    font-weight: 600;
    transition: all 0.3s ease;
}

.navbar.scrolled .btn-outline:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: var(--bg-primary);
}

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

.btn-ghost:hover {
    border-color: var(--text-secondary);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.05rem;
}

/* ===================== NAVBAR ===================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 10px 0;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

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

.logo-img {
    height: 86px;
    width: auto;
    filter: invert(1) sepia(0.6) saturate(2) hue-rotate(5deg) brightness(0.95);
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 36px;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

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

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s;
}

/* ===================== HERO ===================== */
.hero {
    padding: 160px 0 80px;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.highlight {
    color: var(--accent);
    font-style: italic;
}

.typing-text::after {
    content: '|';
    animation: blink 0.7s infinite;
    margin-left: 2px;
}

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

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 36px;
    max-width: 520px;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

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

.hero-image-wrapper {
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    aspect-ratio: 1/1;
    width: 400px;
    height: 400px;
}

.hero-image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(212, 169, 76, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

/* ===================== TRUST BAR ===================== */
.trust-bar {
    padding: 60px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.trust-label {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 32px;
}

.trust-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    transition: color 0.3s;
}

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

.trust-item span {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* ===================== DINÁMICA ===================== */
.dinamica {
    padding: 80px 0;
    border-top: 1px solid var(--border);
}

.dinamica .section-header {
    text-align: center;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.dinamica-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.dinamica-item {
    text-align: center;
    padding: 32px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.dinamica-item:hover {
    border-color: #2a2a40;
    transform: translateY(-4px);
}

.dinamica-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--accent-glow);
    border-radius: 50%;
    color: var(--accent);
    margin-bottom: 20px;
}

.dinamica-item h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.dinamica-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ===================== MÓDULOS ===================== */
.modulos {
    padding: 80px 0;
}

.section-header {
    max-width: 640px;
    margin-bottom: 60px;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.modulos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.modulo-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 28px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.modulo-card:hover {
    background: var(--bg-card-hover);
    border-color: #2a2a40;
    transform: translateY(-4px);
}

.modulo-featured {
    background: linear-gradient(145deg, #161630, var(--bg-card));
    border-color: rgba(123, 154, 255, 0.2);
}

.modulo-featured:hover {
    border-color: rgba(123, 154, 255, 0.4);
}

.modulo-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-glow);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--accent);
}

.modulo-tag {
    font-size: 0.78rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

.modulo-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.modulo-card p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.65;
    flex-grow: 1;
}

.card-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.3s;
}

.card-link:hover {
    color: var(--accent-hover);
}

/* ===================== PROCESO ===================== */
.proceso {
    padding: 120px 0;
    background: var(--bg-secondary);
}

.proceso .section-header {
    text-align: center;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.proceso-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    text-align: center;
}

.step-number {
    display: block;
    font-size: 4.5rem;
    font-weight: 800;
    background: linear-gradient(180deg, var(--accent), transparent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 20px;
}

.proceso-step h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.proceso-step p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ===================== SOBRE MÍ ===================== */
.sobre-mi {
    padding: 120px 0;
}

.sobre-mi-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: center;
}

.sobre-mi-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 3/4;
}

.sobre-mi-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.sobre-mi-text h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.sobre-mi-text p {
    color: var(--text-secondary);
    font-size: 1.02rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.linkedin-link {
    display: inline-block;
    color: var(--text-secondary);
    margin-top: 20px;
    transition: color 0.3s ease;
}

.linkedin-link:hover {
    color: var(--accent);
}

.sobre-mi-stats {
    display: flex;
    gap: 40px;
    margin-top: 36px;
    padding-top: 36px;
    border-top: 1px solid var(--border);
}

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

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===================== CTA ===================== */
.cta-section {
    padding: 120px 0;
    background: var(--bg-secondary);
}

.cta-box {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}

.cta-box h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.25;
}

.cta-box p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 36px;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ===================== POPUP ===================== */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 200;
    justify-content: center;
    align-items: center;
}

.popup-overlay.active {
    display: flex;
}

.popup {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    max-width: 440px;
    width: 90%;
    position: relative;
    animation: popupIn 0.3s ease;
}

@keyframes popupIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.popup-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.popup-close:hover {
    color: var(--text-primary);
}

.popup h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.popup p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 28px;
}

.popup form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.popup input {
    padding: 14px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.popup input:focus {
    outline: none;
    border-color: var(--accent);
}

.popup input::placeholder {
    color: var(--text-muted);
}

.form-error {
    color: #e74c3c;
    font-size: 0.9rem;
    margin: 0;
    min-height: 20px;
}

.popup .btn {
    margin-top: 8px;
}

/* ===================== FOOTER ===================== */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
}

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

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

/* ===================== ANIMATIONS ===================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.modulo-card.fade-in:nth-child(2) { transition-delay: 0.1s; }
.modulo-card.fade-in:nth-child(3) { transition-delay: 0.2s; }

.proceso-step.fade-in:nth-child(2) { transition-delay: 0.1s; }
.proceso-step.fade-in:nth-child(3) { transition-delay: 0.2s; }
.proceso-step.fade-in:nth-child(4) { transition-delay: 0.3s; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 968px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero h1 {
        font-size: 2.4rem;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-ctas {
        justify-content: center;
    }

    .hero-image-wrapper {
        width: 300px;
        height: 300px;
        margin: 0 auto;
    }

    .dinamica-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modulos-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
    }

    .proceso-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 48px 32px;
    }

    .sobre-mi-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .sobre-mi-image {
        max-width: 360px;
        margin: 0 auto;
    }

    .sobre-mi-stats {
        justify-content: center;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        align-items: center;
        gap: 24px;
        padding: 80px 24px 40px;
        z-index: 99;
        transform: translateY(-100%);
        transition: transform 0.35s ease;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.active {
        display: flex;
        transform: translateY(0);
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        padding-bottom: 16px;
        border-bottom: 1px solid rgba(212, 169, 76, 0.15);
    }

    .nav-links li:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    .menu-toggle {
        display: flex;
        z-index: 101;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

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

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

.floating-cta {
    display: none;
}

.mobile-break {
    display: none;
}

@media (max-width: 600px) {

    .mobile-break {
        display: block;
    }
    .hero {
        padding: 160px 0 60px;
        min-height: auto;
    }

    .hero h1 {
        font-size: 2.4rem;
    }

    .section-header h2 {
        font-size: 1.7rem;
    }

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

    .step-number {
        font-size: 3.2rem;
    }

    .trust-logos {
        gap: 32px;
    }

    .footer-container {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .sobre-mi-stats {
        flex-wrap: wrap;
        gap: 24px;
    }

    .cta-box h2 {
        font-size: 1.7rem;
    }

    .floating-cta {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 16px 24px;
        background: rgba(10, 10, 8, 0.95);
        backdrop-filter: blur(20px);
        border-top: 1px solid var(--border);
        z-index: 98;
        transform: translateY(100%);
        transition: transform 0.35s ease;
        text-align: center;
    }

    .floating-cta.visible {
        transform: translateY(0);
    }

    .floating-cta .btn {
        width: 100%;
    }
}
