@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.7);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-cyan: #06b6d4;
    --accent-pink: #ec4899;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    --accent-teal: #14b8a6;
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glow-blue: 0 0 30px rgba(59, 130, 246, 0.15);
    --radius: 16px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: .12;
    pointer-events: none;
    z-index: 0;
}

.bg-glow-1 {
    top: -200px;
    left: -100px;
    background: var(--accent-blue);
}

.bg-glow-2 {
    bottom: -200px;
    right: -100px;
    background: var(--accent-purple);
}

.bg-glow-3 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--accent-cyan);
    opacity: .06;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* HERO */
.hero {
    text-align: center;
    padding: 80px 0 60px;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(139, 92, 246, .15), rgba(59, 130, 246, .15));
    border: 1px solid rgba(139, 92, 246, .3);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: .8rem;
    font-weight: 500;
    color: var(--accent-purple);
    margin-bottom: 24px;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.hero-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-green);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: .4
    }
}

.hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff 0%, #a78bfa 50%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero .subtitle {
    font-size: clamp(.95rem, 2vw, 1.15rem);
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 32px;
}

.hero-img {
    width: 100%;
    max-width: 800px;
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glow-blue);
    margin: 0 auto;
}

/* STATS */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin: 40px 0 60px;
}

.stat-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-item .num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
}

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

.stat-item:nth-child(1) .num {
    color: var(--accent-blue);
}

.stat-item:nth-child(2) .num {
    color: var(--accent-purple);
}

.stat-item:nth-child(3) .num {
    color: var(--accent-cyan);
}

.stat-item:nth-child(4) .num {
    color: var(--accent-green);
}

/* SECTION HEADERS */
.section-header {
    text-align: center;
    margin: 60px 0 40px;
}

.section-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    margin-bottom: 8px;
}

.section-header p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* PRINCIPLE BOX */
.principle-box {
    background: linear-gradient(135deg, rgba(139, 92, 246, .1), rgba(59, 130, 246, .08));
    border: 1px solid rgba(139, 92, 246, .2);
    border-radius: var(--radius);
    padding: 40px;
    margin: 40px 0;
    text-align: center;
}

.principle-box h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    color: var(--accent-purple);
    margin-bottom: 16px;
}

.principle-box .quote {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.principle-box .quote strong {
    color: var(--text-primary);
}

/* OBJECTIVES GRID */
.obj-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.obj-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    transition: transform .2s, border-color .2s;
}

.obj-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, .15);
}

.obj-card .icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.obj-card p {
    font-size: .9rem;
    color: var(--text-secondary);
}

/* METHODOLOGY */
.method-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.method-step {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    position: relative;
}

.method-step .step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .9rem;
    margin-bottom: 10px;
}

.method-step h4 {
    font-size: .9rem;
    margin-bottom: 6px;
}

.method-step p {
    font-size: .78rem;
    color: var(--text-secondary);
}

/* MODULE CARD */
.module-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    margin-bottom: 24px;
    overflow: hidden;
    transition: border-color .3s;
}

.module-card:hover {
    border-color: rgba(255, 255, 255, .12);
}

.module-header {
    padding: 24px 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.module-header::after {
    content: '▾';
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: transform .3s;
}

.module-card.open .module-header::after {
    transform: translateY(-50%) rotate(180deg);
}

.module-num {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.module-info h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.module-info .tag {
    font-size: .75rem;
    color: var(--text-secondary);
}

.module-body {
    display: none;
    padding: 0 28px 24px;
}

.module-card.open .module-body {
    display: block;
}

/* CLASS CARD */
.clase-card {
    background: rgba(0, 0, 0, .2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 12px;
}

.clase-card h4 {
    font-size: .95rem;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.clase-card h4 .clase-num {
    background: rgba(255, 255, 255, .06);
    border-radius: 6px;
    padding: 2px 10px;
    font-size: .75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.clase-card .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.clase-card .tag {
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 6px;
    padding: 3px 10px;
    font-size: .72rem;
    color: var(--text-secondary);
}

.clase-card .objetivo {
    background: linear-gradient(135deg, rgba(16, 185, 129, .08), rgba(6, 182, 212, .05));
    border-left: 3px solid var(--accent-green);
    border-radius: 0 8px 8px 0;
    padding: 10px 14px;
    font-size: .82rem;
    color: var(--text-secondary);
    margin-top: 10px;
}

.clase-card .objetivo strong {
    color: var(--accent-green);
}

.clase-card .practica {
    background: linear-gradient(135deg, rgba(245, 158, 11, .08), rgba(239, 68, 68, .05));
    border-left: 3px solid var(--accent-orange);
    border-radius: 0 8px 8px 0;
    padding: 10px 14px;
    font-size: .82rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

.clase-card .practica strong {
    color: var(--accent-orange);
}

/* COLORS PER MODULE */
.mod-1 .module-num {
    background: rgba(59, 130, 246, .15);
    color: var(--accent-blue);
}

.mod-2 .module-num {
    background: rgba(139, 92, 246, .15);
    color: var(--accent-purple);
}

.mod-3 .module-num {
    background: rgba(6, 182, 212, .15);
    color: var(--accent-cyan);
}

.mod-4 .module-num {
    background: rgba(245, 158, 11, .15);
    color: var(--accent-orange);
}

.mod-5 .module-num {
    background: rgba(236, 72, 153, .15);
    color: var(--accent-pink);
}

.mod-6 .module-num {
    background: rgba(16, 185, 129, .15);
    color: var(--accent-green);
}

.mod-7 .module-num {
    background: rgba(239, 68, 68, .15);
    color: var(--accent-red);
}

.mod-8 .module-num {
    background: rgba(20, 184, 166, .15);
    color: var(--accent-teal);
}

/* ESSENTIAL CLASSES */
.essential-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.essential-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, .08), rgba(139, 92, 246, .06));
    border: 1px solid rgba(59, 130, 246, .2);
    border-radius: 12px;
    padding: 20px;
}

.essential-card .num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-blue);
}

.essential-card h4 {
    font-size: .9rem;
    margin: 6px 0 4px;
}

.essential-card p {
    font-size: .78rem;
    color: var(--text-secondary);
}

/* MATERIAL */
.material-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.material-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.material-item .icon {
    font-size: 1.4rem;
}

.material-item p {
    font-size: .85rem;
    color: var(--text-secondary);
}

/* FOOTER */
.footer {
    text-align: center;
    padding: 60px 0 40px;
    border-top: 1px solid var(--glass-border);
    margin-top: 60px;
}

.footer p {
    font-size: .85rem;
    color: var(--text-secondary);
}

.footer .brand {
    color: var(--accent-purple);
    font-weight: 600;
}

/* NAV */
.toc {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 14, 26, .85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    padding: 12px 0;
}

.toc-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    overflow-x: auto;
    scrollbar-width: none;
}

.toc-inner::-webkit-scrollbar {
    display: none;
}

.toc-inner a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: .78rem;
    font-weight: 500;
    white-space: nowrap;
    transition: color .2s;
}

.toc-inner a:hover {
    color: var(--text-primary);
}

@media(max-width:640px) {
    .hero {
        padding: 50px 0 40px;
    }

    .module-header {
        padding: 18px 16px;
    }

    .module-body {
        padding: 0 16px 18px;
    }

    .clase-card {
        padding: 14px;
    }
}