/* --- 1. Variables Globales y Tipografía --- */
:root {
    --font-primary: 'Inter', sans-serif;
    --font-mono: 'Fira Code', monospace;
    --color-primary: #6366f1; /* Indigo 500 - Elegante y vibrante */
    --color-primary-glow: rgba(99, 102, 241, 0.4);
    --color-secondary: #4f46e5; /* Indigo 600 - Hover */
    --color-bg: #0f172a; /* Slate 900 - Fondo Premium oscuro */
    --color-text: #94a3b8; /* Slate 400 - Texto secundario */
    --color-text-light: #f8fafc; /* Slate 50 - Texto Principal */
    --bg-card: rgba(30, 41, 59, 0.7); /* Slate 800 semi-transparente para tarjetas */
    --border-card: rgba(255, 255, 255, 0.08);
    
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 0 20px var(--color-primary-glow);
    --border-radius: 12px;
}

/* --- 2. Estilos Base --- */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 80px;
    font-family: var(--font-primary);
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.07) 0%, transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(79, 70, 229, 0.05) 0%, transparent 40%);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--color-text-light);
    letter-spacing: -0.5px;
}

/* Ajustes de utilidad Bootstrap */
.bg-light { background-color: transparent !important; }
.text-dark { color: var(--color-text-light) !important; }

/* --- 3. Navbar y Footer --- */
.navbar {
    background-color: rgba(15, 23, 42, 0.85) !important; /* Translucido Slate 900 */
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-family: var(--font-mono);
    color: var(--color-primary) !important;
    font-weight: 700;
    letter-spacing: 1px;
}

.navbar-brand img {
    height: 45px;
    width: auto;
    filter: drop-shadow(0 0 8px var(--color-primary-glow));
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--color-text-light) !important;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--color-primary) !important;
}

.nav-link::before {
    content: '<';
    color: var(--color-primary);
    opacity: 0;
    transition: opacity 0.3s;
    margin-right: 2px;
}
.nav-link::after {
    content: '/>';
    color: var(--color-primary);
    opacity: 0;
    transition: opacity 0.3s;
    margin-left: 2px;
}
.nav-link:hover::before, .nav-link:hover::after {
    opacity: 1;
}

footer {
    background-color: #0b1120 !important; /* Slate aún más oscuro */
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--color-text);
    padding: 2rem 0;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

/* --- 4. Hero Section Terminal Style --- */
.hero-section {
    min-height: 85vh; /* Un poco más alto para mostrar más imagen */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center; /* Alineación centrada */
    
    /* Propiedades cruciales para que la imagen se vea completa y bien centrada */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Efecto parallax elegante */
}

/* Superposición suave para asegurar que el texto sea legible
   pero dejando ver la imagen de fondo subida del admin */
.hero-section::before {
    content: '';
    position: absolute;
    top:0; left:0; width:100%; height:100%;
    background-color: rgba(15, 23, 42, 0.6); /* Slate 900 al 60% de opacidad */
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
    padding: 3rem 2rem;
    background-color: rgba(30, 41, 59, 0.5); /* Slate 800 Glass */
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08); /* Borde premium sutil */
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    max-width: 850px;
}

.hero-section h1 {
    font-size: 3.5rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8); /* Sombra para resaltar texto sobre cualquier imagen */
}

.hero-section h1::after {
    content: '_';
    animation: blink 1s step-end infinite;
    color: var(--color-primary);
}

.hero-profile-img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-primary);
    box-shadow: 0 0 20px var(--color-primary-glow);
    margin-bottom: 2rem;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.hero-profile-img:hover {
    transform: scale(1.08) rotate(3deg);
    box-shadow: 0 0 35px rgba(0, 229, 255, 0.8);
}

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

.hero-section p.lead {
    font-family: var(--font-mono);
    color: var(--color-primary);
    font-size: 1.2rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

/* --- 5. Tarjetas (Cards) Modernas --- */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
}

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

.card-title {
    color: var(--color-text-light);
    font-family: var(--font-mono);
}

.project-card img {
    border-top-left-radius: calc(var(--border-radius) - 1px);
    border-top-right-radius: calc(var(--border-radius) - 1px);
    border-bottom: 1px solid var(--border-card);
    filter: grayscale(80%) contrast(120%);
    transition: filter 0.4s ease;
}

.project-card:hover img {
    filter: grayscale(0%) contrast(100%);
}

/* --- 6. Botones --- */
.btn-primary {
    background-color: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    padding: 0.75rem 1.8rem;
    font-family: var(--font-mono);
    font-weight: 500;
    border-radius: 4px; /* Cuadrados para look tech */
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: rgba(0, 229, 255, 0.1);
    color: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.3);
    transform: translateY(-2px);
}

/* --- 7. Muro de Habilidades Tech --- */
.skill-category .category-title {
    color: var(--color-text-light);
    border-bottom: 1px dashed rgba(255,255,255,0.1);
    font-family: var(--font-mono);
}

.skill-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    padding: 1.2rem 1rem;
    width: 110px;
    transition: all 0.3s ease;
}

.skill-item:hover {
    border-color: var(--color-primary);
    background-color: rgba(0, 229, 255, 0.05);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
    transform: translateY(-5px);
}

.skill-item i {
    font-size: 2.5rem;
    color: var(--color-text-light);
    transition: color 0.3s ease;
}

.skill-item:hover i {
    color: var(--color-primary);
}

.skill-item span {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text);
    margin-top: 8px;
}

/* --- 8. Animaciones de Scroll --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Removidas clases de Tema Claro Obsoletas --- */

/* --- Formularios Contáctame (Si aplicara en el futuro) --- */
.form-control {
    background-color: rgba(255,255,255,0.05);
    border: 1px solid var(--border-card);
    color: var(--color-text-light);
}
.form-control:focus {
    background-color: rgba(255,255,255,0.1);
    border-color: var(--color-primary);
    color: white;
    box-shadow: 0 0 0 0.25rem rgba(0, 229, 255, 0.25);
}

/* ========================================= */
/* HABILIDADES (SKILLS)                     */
/* ========================================= */
.skills-wall {
    padding: 1rem 0;
}
.skill-category {
    margin-bottom: 2rem;
}
.category-title {
    font-size: 1.1rem;
    color: var(--color-indigo-400);
    margin-bottom: 1.5rem;
    font-weight: 600;
}
.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 1rem;
    width: 110px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all var(--transition-speed);
    cursor: default;
}
.skill-item i {
    font-size: 2.5rem;
    color: var(--color-gray-300);
    transition: all var(--transition-speed);
}
.skill-item span {
    font-size: 0.85rem;
    color: var(--color-gray-400);
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}
.skill-item .skill-img {
    max-width: 45px;
    max-height: 45px;
    object-fit: contain;
    transition: all var(--transition-speed);
}
.skill-item:hover {
    transform: translateY(-5px);
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--color-indigo-500);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
.skill-item:hover i {
    color: var(--color-indigo-400);
    transform: scale(1.1);
}
.skill-item:hover .skill-img {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.5));
}
.skill-item:hover span {
    color: var(--color-indigo-300);
}

/* --- Media Queries --- */
@media (max-width: 768px) {
    .hero-section h1 { font-size: 2.2rem; }
    .hero-section p.lead { font-size: 1rem; }
    .hero-section .container { padding: 1rem; }
    .skill-item { width: 90px; padding: 0.8rem; }
    .skill-item i { font-size: 2rem; }
}
