/* ===========================================================
   Rincón Geek — visual system
   Tema "circuito": fondo oscuro azulado, acentos verde-lima
   y cian eléctrico, tipografía mixta (display + mono detalles)
   =========================================================== */

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

:root {
    --primary-color: #39FF8E;      /* verde lima eléctrico */
    --primary-dark: #1FCB6B;
    --secondary-color: #00C8FF;    /* cian acento */
    --dark-color: #0B1320;         /* azul casi negro */
    --dark-color-2: #121C2E;
    --light-color: #F4F7F6;
    --text-color: #1B2330;
    --text-light: #5C6B7A;
    --border-soft: #E3E9EC;
    --shadow: 0 2px 14px rgba(11,19,32,0.08);
    --shadow-lg: 0 12px 32px rgba(11,19,32,0.16);
    --border-radius: 10px;
    --font-display: 'Space Grotesk', 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    background: var(--light-color);
    line-height: 1.6;
}

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

/* Subtle circuit-dot background texture, used on dark sections */
.header,
.hero,
.dashboard-sidebar,
.footer {
    background-image:
        radial-gradient(circle at 2px 2px, rgba(57,255,142,0.06) 1px, transparent 1.5px);
    background-size: 22px 22px;
}

/* ============ Header ============ */
.header {
    background: var(--dark-color);
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(57,255,142,0.18);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 0;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo img {
    border-radius: 6px;
}

.nav-brand {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.2px;
}

.nav-brand::after {
    content: '_';
    color: var(--primary-color);
    animation: blink 1.1s steps(2) infinite;
}

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

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.6rem;
    align-items: center;
}

.nav-menu a {
    color: rgba(255,255,255,0.78);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.25s;
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.nav-menu a.btn-primary,
.nav-menu a.btn-primary:hover {
    color: var(--dark-color);
}

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #fff;
}

/* ============ Buttons ============ */
.btn {
    display: inline-block;
    padding: 11px 22px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--dark-color);
    box-shadow: 0 4px 14px rgba(57,255,142,0.28);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(57,255,142,0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--dark-color);
}

.btn-lg {
    padding: 15px 32px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
}

.btn-danger {
    background: #E5484D;
    color: white;
}

.btn-danger:hover {
    background: #c13d41;
}

/* ============ Hero ============ */
.hero {
    background: linear-gradient(160deg, var(--dark-color) 0%, var(--dark-color-2) 55%, #0E2A23 100%);
    color: white;
    padding: 100px 0 90px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '< />';
    position: absolute;
    font-family: var(--font-mono);
    font-size: 14rem;
    font-weight: 700;
    color: rgba(57,255,142,0.04);
    top: -40px;
    right: -40px;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-family: var(--font-display);
    font-size: 3.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.hero-content h1 .accent,
.hero-content h1 strong {
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2.2rem;
    color: rgba(255,255,255,0.72);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.hero-buttons .btn-secondary {
    color: white;
    border-color: rgba(255,255,255,0.4);
}

.hero-buttons .btn-secondary:hover {
    background: white;
    color: var(--dark-color);
    border-color: white;
}

.hero-message {
    border-radius: var(--border-radius) !important;
}

/* ============ Features ============ */
.features {
    padding: 70px 0;
}

.section-title {
    text-align: center;
    font-family: var(--font-display);
    font-size: 2.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.75rem;
    margin-top: 2.5rem;
}

.feature-card {
    text-align: center;
    padding: 2.2rem 1.5rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-soft);
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 2.4rem;
    color: var(--dark-color);
    margin-bottom: 1.1rem;
    width: 64px;
    height: 64px;
    line-height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(57,255,142,0.16), rgba(0,200,255,0.12));
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    font-family: var(--font-display);
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ============ Courses & Projects ============ */
.courses-section,
.projects-section {
    padding: 70px 0;
    background: white;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.2rem;
}

.section-header .section-title {
    margin-bottom: 0;
    text-align: left;
}

.courses-grid,
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.75rem;
}

.course-card,
.project-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-soft);
    transition: transform 0.25s, box-shadow 0.25s;
}

.course-card:hover,
.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.course-image,
.project-image-placeholder {
    height: 180px;
    background: linear-gradient(135deg, var(--dark-color) 0%, #0E3A2E 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 2.6rem;
    position: relative;
}

.course-image::after,
.project-image-placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.08) 1px, transparent 1.5px);
    background-size: 16px 16px;
}

.course-content,
.project-content {
    padding: 1.5rem;
}

.course-content h3,
.project-content h3 {
    margin-bottom: 0.5rem;
    font-family: var(--font-display);
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.badge.principiante {
    background: rgba(57,255,142,0.15);
    color: var(--primary-dark);
}

.badge.intermedio {
    background: rgba(0,200,255,0.15);
    color: #0084AD;
}

.badge.avanzado {
    background: rgba(229,72,77,0.12);
    color: #C53030;
}

/* ============ Auth ============ */
.auth-container {
    max-width: 420px;
    margin: 60px auto;
    padding: 0 20px;
}

.auth-box {
    background: white;
    padding: 2.4rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border-top: 4px solid var(--primary-color);
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-family: var(--font-display);
    color: var(--dark-color);
}

.auth-link {
    text-align: center;
    margin-top: 1.2rem;
    color: var(--text-light);
}

.auth-link a {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 600;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* ============ Forms ============ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid var(--border-soft);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(57,255,142,0.18);
}

/* ============ Alerts ============ */
.alert {
    padding: 12px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    font-size: 0.92rem;
    border-left: 4px solid transparent;
}

.alert-error {
    background: #FDEDED;
    color: #B42318;
    border-left-color: #E5484D;
}

.alert-success {
    background: #EAFBF1;
    color: #1B7A43;
    border-left-color: var(--primary-color);
}

/* ============ Dashboard ============ */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - 140px);
}

.dashboard-sidebar {
    width: 250px;
    background: var(--dark-color);
    color: white;
    padding: 2rem 1rem;
    border-right: 1px solid rgba(57,255,142,0.12);
}

.dashboard-sidebar h3 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    padding: 0 1rem;
    font-family: var(--font-display);
}

.dashboard-menu {
    list-style: none;
}

.dashboard-menu li {
    margin-bottom: 0.4rem;
}

.dashboard-menu a {
    display: block;
    padding: 10px 1rem;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all 0.25s;
}

.dashboard-menu a:hover,
.dashboard-menu a.active {
    background: rgba(57,255,142,0.14);
    color: var(--primary-color);
}

.dashboard-menu a i {
    margin-right: 10px;
    width: 20px;
}

.dashboard-content {
    flex: 1;
    padding: 2rem;
    background: var(--light-color);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-header h1,
.dashboard-header h2 {
    font-family: var(--font-display);
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: box-shadow 0.25s, transform 0.25s;
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.stat-icon {
    font-size: 2.2rem;
    color: var(--dark-color);
    width: 56px;
    height: 56px;
    line-height: 56px;
    text-align: center;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(57,255,142,0.16), rgba(0,200,255,0.12));
}

.stat-info h3 {
    font-size: 1.8rem;
    font-family: var(--font-display);
    color: var(--dark-color);
}

.stat-info p {
    color: var(--text-light);
    font-size: 0.88rem;
}

.dashboard-actions {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-soft);
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.table-container {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-soft);
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-table th,
.dashboard-table td {
    padding: 13px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-soft);
}

.dashboard-table th {
    background: #F4F7F6;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-light);
}

.dashboard-table tr:hover {
    background: #FAFCFB;
}

/* ============ Footer ============ */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 3.5rem 0 1.5rem;
    border-top: 1px solid rgba(57,255,142,0.15);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1.1rem;
    font-family: var(--font-display);
    color: var(--primary-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.6rem;
}

.footer-section a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    transition: color 0.2s;
}

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

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

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    color: white;
    transition: all 0.25s;
}

.social-links a:hover {
    background: var(--primary-color);
    color: var(--dark-color);
    border-color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.2rem;
    text-align: center;
    color: rgba(255,255,255,0.4);
    font-size: 0.85rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 2rem;
    text-align: left;
}

.hero-grid .hero-content {
    text-align: left;
}

.hero-grid .hero-buttons {
    justify-content: flex-start;
}

.hero-image img {
    width: 100%;
    max-width: 460px;
    display: block;
    margin: 0 auto;
}

.hero-message {
    background: rgba(255,255,255,0.08);
    padding: 20px 28px;
    border-radius: var(--border-radius);
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(57,255,142,0.25);
}

.cta-banner {
    background: linear-gradient(135deg, var(--dark-color), #0E2A23);
    padding: 36px;
    border-radius: var(--border-radius);
    text-align: center;
    color: white;
    margin-top: 3rem;
    border: 1px solid rgba(57,255,142,0.25);
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.empty-state i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
}

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-grid .hero-content {
        text-align: center;
    }
    .hero-grid .hero-buttons {
        justify-content: center;
    }
    .hero-image {
        order: -1;
    }
    .hero-image img {
        max-width: 320px;
    }
}

/* ============ Responsive ============ */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--dark-color);
        padding: 1rem;
        box-shadow: var(--shadow-lg);
        align-items: flex-start;
    }

    .nav-menu.active {
        display: flex;
    }

    .hero {
        padding: 70px 0 60px;
    }

    .hero-content h1 {
        font-size: 2.1rem;
    }

    .hero::before {
        font-size: 8rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .section-header .section-title {
        text-align: center;
    }

    .dashboard-container {
        flex-direction: column;
    }

    .dashboard-sidebar {
        width: 100%;
    }

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