:root {
    --primary: #0f172a;
    --secondary: #6366f1;
    --accent: #22c55e;
    --bg: #020617;
    --text: #e2e8f0;
    --card: rgba(30, 41, 59, 0.5);
    --border: rgba(255, 255, 255, 0.1);
    --radius: 12px;
    --font: 'Inter', sans-serif;
    --text-gradient: linear-gradient(90deg, #818cf8, #34d399);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    background-color: var(--bg);
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(34, 197, 94, 0.1) 0px, transparent 50%);
    color: var(--text);
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* Tipografía */
h1,
h2,
h3 {
    color: #fff;
    margin-bottom: 1rem;
}

.text-gradient {
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navegación */
header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    background: rgba(2, 6, 23, 0.8);
}

nav ul {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem;
    list-style: none;
}

nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: 0.3s;
}

nav a:hover {
    color: var(--secondary);
}

/* Secciones */
section {
    max-width: 1000px;
    margin: auto;
    padding: 100px 20px;
}

/* Hero */
#inicio {
    text-align: center;
    padding: 180px 20px 100px;
}

.badge {
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
    padding: 6px 16px;
    border-radius: 50px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
}

#inicio h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    margin: 1.5rem 0;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Botones */
.btn-primary,
.btn-secondary {
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    display: inline-block;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--secondary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-cv {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 10px 20px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px dashed var(--secondary);
    color: var(--secondary);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: 0.3s;
}

.btn-cv:hover {
    background: var(--secondary);
    color: white;
    transform: scale(1.02);
}

/* Proyectos */
.proyectos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.proyecto {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: var(--radius);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

.proyecto:hover {
    border-color: var(--secondary);
    transform: translateY(-5px);
}

.repo-lang {
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: bold;
    text-transform: uppercase;
}

.github-link {
    margin-top: auto;
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    padding-top: 1rem;
}

/* Habilidades */
.habilidades {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem 3rem; /* Más espacio entre columnas */
}

.habilidad-item {
    margin-bottom: 1.5rem;
}

.habilidad-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.barra-habilidad {
    background: rgba(255, 255, 255, 0.05);
    height: 8px;
    border-radius: 10px;
}

.barra-progreso {
    height: 100%;
    border-radius: 10px;
    background: var(--secondary);
    width: 0;
    transition: 1.5s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

/* Formulario */
.formulario-contacto {
    background: var(--card);
    padding: 2.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 1.2rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

input,
textarea {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: white;
    font-family: inherit;
}

input:focus {
    outline: none;
    border-color: var(--secondary);
}

.alerta-exito {
    display: none;
    margin-top: 1rem;
    color: var(--accent);
    font-weight: 600;
}

footer {
    text-align: center;
    padding: 3rem;
    opacity: 0.5;
    font-size: 0.8rem;
}