:root {
    --bg: #050508;
    --primary: #00d2ff;
    --primary-glow: rgba(0, 210, 255, 0.3);
    --text: #f0f0f5;
    --text-muted: #a0a0b0;
    --glass: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.2rem 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(5, 5, 8, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.logo span {
    color: var(--primary);
    font-weight: 900;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: #fff;
    font-size: 0.9rem;
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Centrado vertical */
    align-items: center;
    /* Centrado horizontal */
    text-align: center;
    padding: 0 10%;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Alinea hijos al centro */
    width: 100%;
}

.hero h4 {
    color: var(--primary);
    letter-spacing: 4px;
    text-transform: uppercase;
    font-size: 0.85rem;
    margin-bottom: 25px;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    margin-bottom: 25px;
    font-weight: 900;
    line-height: 1.1;
}

.hero p {
    color: var(--text-muted);
    max-width: 650px;
    margin-bottom: 25px;
    font-size: 1.1rem;
}

/* Contenedor de correo centrado */
.contact-direct {
    margin-bottom: 45px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.contact-direct a {
    color: var(--primary);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
}

/* Botones alineados horizontalmente en el centro */
.hero-btns {
    display: flex;
    gap: 25px;
    justify-content: center;
    flex-wrap: wrap;
    /* Para que en móviles se ajusten bien */
}

/* Contacto Directo */
.contact-direct {
    margin-bottom: 45px;
}

.contact-direct a {
    color: var(--primary);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: 0.3s;
}

.contact-direct i {
    margin-right: 10px;
}

/* Botones con Espacio */
.hero-btns {
    display: flex;
    gap: 25px;
    justify-content: center;
}

.btn {
    padding: 16px 35px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: 0.4s;
}

.primary {
    background: var(--primary);
    color: #000;
}

.secondary {
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px var(--primary-glow);
}

/* Habilidades */
section {
    padding: 100px 10%;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 80px;
    color: var(--primary);
    font-weight: 800;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.skill-card {
    background: var(--glass);
    border: 1px solid var(--border);
    padding: 45px 30px;
    border-radius: 20px;
    text-align: center;
    transition: 0.4s;
}

.skill-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.skill-card i {
    font-size: 2.8rem;
    color: var(--primary);
    margin-bottom: 20px;
}

/* Proyectos (Estilo Limpio) */
.project-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    background: rgba(15, 20, 30, 0.7);
    padding: 35px;
    border-radius: 18px;
    border: 1px solid var(--border);
    transition: 0.4s;
    min-height: 240px;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: var(--primary);
    transform: scale(1.02);
}

.project-tag {
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 12px;
}

/* Chatbot Fix */
.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.chat-trigger {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: 0 10px 25px var(--primary-glow);
}

.chat-window {
    width: 320px;
    height: 450px;
    background: #08080c;
    position: absolute;
    bottom: 80px;
    right: 0;
    display: none;
    flex-direction: column;
    border-radius: 15px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.chat-header {
    background: var(--primary);
    color: #000;
    padding: 18px;
    display: flex;
    justify-content: space-between;
    font-weight: 800;
}

.chat-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.9rem;
}

.bot-msg {
    background: rgba(255, 255, 255, 0.08);
    padding: 12px;
    border-radius: 12px 12px 12px 0;
    align-self: flex-start;
}

.user-msg {
    background: var(--primary);
    color: #000;
    padding: 12px;
    border-radius: 12px 12px 0 12px;
    align-self: flex-end;
}

.chat-footer {
    padding: 15px;
    display: flex;
    gap: 10px;
    border-top: 1px solid var(--border);
}

.chat-footer input {
    flex: 1;
    background: #1a1a20;
    border: none;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    outline: none;
}