:root {
    --bg-dark: #070b14; /* Tono muy oscuro casi negro */
    --bg-card: #111827; /* Gris pizarra oscuro corporativo */
    --primary: #2563eb; /* Azul corporativo técnico */
    --primary-hover: #3b82f6;
    --secondary: #0f172a; /* Azul marino profundo */
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --glass-border: #1e293b; /* Borde sutil y sólido */
    --font-title: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    background-image: radial-gradient(circle at top right, rgba(37, 99, 235, 0.05), transparent 50%);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-title);
    color: #ffffff;
}

a { text-decoration: none; color: inherit; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header - Sobrio y profesional */
.main-header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(7, 11, 20, 0.95);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 0;
    transition: all 0.3s ease;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logo img { height: 40px; }

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 5px;
}

.nav-link {
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    color: #fff;
    background: rgba(37, 99, 235, 0.1);
}

.nav-link.active {
    color: #fff;
    background: var(--primary);
    border: 1px solid var(--glass-border);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

/* Content Wrapper */
.content-wrapper {
    padding-top: 100px;
    min-height: calc(100vh - 80px);
}

/* Typography & Globals */
h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 10px;
    color: #ffffff;
}

.section-description {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 50px;
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-3px);
}

.btn-link {
    color: var(--primary);
    font-weight: bold;
    margin-top: 15px;
    display: inline-block;
}

.btn-link:hover { text-decoration: underline; }

/* Grids & Cards (Reutilizable) */
.service-grid, .education-grid, .demo-grid, .project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    padding-bottom: 50px;
}

.service-item, .education-item, .project-item {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 35px 25px;
    transition: all 0.4s ease;
}

.service-item:hover, .education-item:hover, .project-item:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Tarjetas de Demo - Diseño Profesional */
.demo-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
}

.demo-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 10px 40px rgba(37, 99, 235, 0.2);
}

.demo-image {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.demo-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.demo-card:hover .demo-image img {
    transform: scale(1.1);
}

.demo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(7, 11, 20, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
}

.demo-card:hover .demo-overlay {
    opacity: 1;
}

/* Botón de Demo Profesional */
.btn-demo {
    background: rgba(37, 99, 235, 0.1);
    color: #ffffff;
    border: 1px solid var(--primary);
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.2);
}

.btn-demo:hover {
    background: var(--primary);
    box-shadow: 0 0 25px rgba(37, 99, 235, 0.6);
    transform: scale(1.05);
}

.demo-info {
    padding: 30px;
}

.demo-info h3 { margin-bottom: 10px; }
.demo-info p { color: var(--text-muted); font-size: 0.95rem; }

/* Etiquetas Tecnológicas (Tech Tags) */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.tech-tag {
    background: var(--bg-dark);
    color: var(--primary-hover);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    border: 1px solid var(--glass-border);
    text-transform: uppercase;
}

/* Animaciones de Scroll */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Icon Wrapper Styling */
.icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    background: rgba(37, 99, 235, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 20px;
    border: 1px solid var(--glass-border);
}

/* Hero Section */
.hero-section .container {
    display: flex;
    align-items: center;
    min-height: 70vh;
    gap: 50px;
}

.hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.hero-actions { display: flex; gap: 15px; }

/* Contact Form */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 15px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: #fff;
    font-family: inherit;
    transition: border 0.3s;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.social-links { margin-top: 20px; display: flex; gap: 15px; }
.social-links a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 1px solid var(--glass-border);
    transition: 0.3s;
}
.social-links a:hover { background: var(--primary); color: #000; }