* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1abc9c;
    --primary-dark: #109177;
    --secondary: #34495E;
    --terminal-bg: #0a0f1e;
    --terminal-text: #a0f0e8;
    --dashboard-bg: #0f1724;
    --panel-bg: #1e293b;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #05070f;
    color: #e4ebf4;
    scroll-behavior: smooth;
}

#bg-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.page-wrapper {
    background: linear-gradient(180deg, #03060c 0%, #02040a 100%);
    position: relative;
    z-index: 1;
}

/* Navegación */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(9, 16, 28, 0.86);
    backdrop-filter: blur(12px);
    z-index: 1000;
    padding: 20px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
}

.brand {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 32px;
}

.navbar a {
    color: rgba(226, 232, 240, 0.85);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    transition: 0.3s;
}

.navbar a:hover,
.navbar a.active {
    color: var(--primary);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 26px;
    height: 3px;
    background: white;
    transition: 0.3s;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    .navbar ul {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: rgba(9, 16, 28, 0.96);
        padding: 24px;
        transform: translateY(-120%);
        opacity: 0;
        transition: 0.4s;
        pointer-events: none;
    }
    .navbar.open ul {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
}

/* Hero */
.hero {
    min-height: 100vh;
    padding: 160px 20px;
    display: flex;
    align-items: center;
}

.hero-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.hero-text .eyebrow {
    color: var(--primary);
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.hero-text h1 {
    font-size: 3rem;
    margin: 20px 0;
}

.hero-buttons {
    margin-top: 30px;
}

.btn {
    background: linear-gradient(90deg, #7c3aed, #06b6d4);
    padding: 12px 24px;
    border-radius: 30px;
    color: white;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    margin-right: 15px;
}

.hero-icons {
    background: rgba(12, 18, 30, 0.7);
    border-radius: 24px;
    padding: 30px;
}

.icon-group {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

/* Secciones generales */
section {
    padding: 80px 0;
}

.section-subtitle {
    max-width: 720px;
    margin: 0 auto 40px;
    text-align: center;
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.7);
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

/* About */
.about-card {
    background: rgba(9, 18, 30, 0.92);
    border-radius: 28px;
    padding: 30px;
    margin: 20px auto;
    max-width: 1100px;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

/* Habilidades */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-tag {
    background: rgba(26, 188, 156, 0.2);
    padding: 8px 18px;
    border-radius: 30px;
}

/* Terminal Cards */
.terminal-card {
    background: linear-gradient(135deg, #071029, #0b1220);
    border-radius: 32px;
    padding: 30px;
    max-width: 1200px;
    margin: 40px auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.terminal-card h2 {
    text-align: center;
    margin-bottom: 10px;
}

.terminal-card p {
    text-align: center;
    margin-bottom: 20px;
}

.terminal-header {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.terminal-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.terminal-dot:nth-child(1) {
    background: #ff5f56;
}

.terminal-dot:nth-child(2) {
    background: #ffbd2e;
}

.terminal-dot:nth-child(3) {
    background: #27c93f;
}

.terminal-window,
.rpa-terminal {
    background: var(--terminal-bg);
    border-radius: 12px;
    padding: 20px;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--terminal-text);
    overflow-x: auto;
    max-height: 350px;
    overflow-y: auto;
}

.prompt {
    color: #7c3aed;
}

.command {
    color: #f1c40f;
}

.output {
    color: #86efac;
}

/* Pipeline visualization */
.pipeline-viz {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.pipeline-stage {
    flex: 1;
    background: var(--panel-bg);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    font-size: 0.8rem;
}

.pipeline-stage.completed {
    background: #1abc9c20;
    border-left: 3px solid #1abc9c;
}

/* Dashboard */
.dashboard {
    background: var(--dashboard-bg);
    border-radius: 16px;
    padding: 20px;
    margin-top: 20px;
}

.dashboard-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.dashboard-panel {
    background: var(--panel-bg);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.dashboard-panel h4 {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 10px;
}

.dashboard-panel .value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary);
}

.sparkline-canvas {
    width: 100%;
    height: 60px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-top: 10px;
}

#alert-banner {
    margin-top: 15px;
    padding: 10px;
    background: rgba(243, 156, 18, 0.2);
    border-radius: 12px;
    font-size: 0.8rem;
}

/* Cluster canvas */
.cluster-viz {
    margin-top: 30px;
    text-align: center;
}

#k8sCanvas {
    width: 100%;
    height: 250px;
    background: #0a0f1e;
    border-radius: 16px;
}

/* Experiencia */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

.experience-card {
    background: rgba(9, 18, 30, 0.92);
    border-radius: 28px;
    padding: 0;
    transition: transform 0.3s ease, box-shadow 0.3s;
    cursor: pointer;
    overflow: hidden;
}

.experience-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.4);
}

.exp-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 30px;
    background: rgba(26, 188, 156, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.exp-header i {
    font-size: 2.5rem;
    color: var(--primary);
}

.exp-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.exp-header .company {
    font-size: 0.9rem;
    color: var(--primary);
    margin-left: auto;
}

.exp-details {
    max-height: 0;
    padding: 0 30px;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.3s;
    background: rgba(0, 0, 0, 0.3);
}

.experience-card:hover .exp-details {
    max-height: 400px;
    padding: 20px 30px;
}

.exp-details ul {
    margin-left: 20px;
    list-style-type: disc;
    color: #ccc;
}

.exp-details li {
    margin: 10px 0;
    line-height: 1.5;
}

.exp-date {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--primary);
    margin-top: 10px;
}

/* Proyectos */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

.project {
    background: rgba(9, 18, 30, 0.92);
    border-radius: 28px;
    padding: 30px;
}

.project a {
    color: var(--primary);
    text-decoration: none;
    margin-top: 15px;
    display: inline-block;
}

/* Contacto */
#contact {
    background: #0b1220;
    padding: 60px 24px;
}

.contact-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-container a {
    color: var(--primary);
    text-decoration: none;
}

footer {
    text-align: center;
    padding: 30px;
    background: rgba(0, 0, 0, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
    }
    .exp-header {
        flex-wrap: wrap;
    }
    .exp-header .company {
        margin-left: 0;
    }
    .pipeline-viz {
        flex-direction: column;
    }
}
