/* Variables para Modo Claro (Default) */
:root {
    --color-primary: #1c1c1e; 
    --color-background: #ffffff;
    --color-surface: #f5f5f7;
    --color-highlight: #007aff;
    --color-border: #e0e0e6;
    --color-text-secondary: #636366;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

/* Variables para Modo Oscuro (Se aplica con la clase .dark-mode) */
.dark-mode {
    --color-primary: #f5f5f7;
    --color-background: #1c1c1e;
    --color-surface: #2c2c2e;
    --color-highlight: #0a84ff;
    --color-border: #3a3a3c;
    --color-text-secondary: #aeaeb2;
}

/* Base / Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--color-primary);
    background-color: var(--color-background);
    transition: background-color 0.3s, color 0.3s;
		scroll-padding-top: 1000px; 
    scroll-behavior: smooth;
}

/* Tipografía */
h1, h2, h3 {
    line-height: 1.2;
    font-weight: 600;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; margin-bottom: 1.5rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }

p {
    margin-bottom: 1rem;
    font-weight: 400;
}

.highlight {
    color: var(--color-highlight);
    font-weight: 700;
}

/* Utilidades */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 40px 0;
}

/* Reemplaza la definición original de HR */
hr {
    display: none; 
}

/* Líneas de Separación Estilizadas */
.section-divider {
    height: 1px;
    width: 80%;
    max-width: 600px;
    margin: 40px auto; 
    background-color: var(--color-border);
    border: none;
    transition: width 0.4s ease-out, background-color 0.3s;
}

.section-divider:hover {
    width: 100%;
    background-color: var(--color-text-secondary);
}

/* ------------------------------------------------------------------ */
/* --- FORMAS GEOMÉTRICAS DE FONDO (Con Movimiento) --- */
/* ------------------------------------------------------------------ */

.geometric-shape {
    position: fixed;
    border-radius: 50%;
    opacity: 0.1; /* Muy sutil */
    z-index: -1; 
    filter: blur(100px); 
    transition: background-color 0.3s;
}

/* Movimiento más complejo */
@keyframes fluidMovement {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    33% {
        transform: translate(80px, -40px) scale(1.1) rotate(20deg);
    }
    66% {
        transform: translate(-50px, 60px) scale(0.9) rotate(-10deg);
    }
    100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
}

/* Movimiento lento original */
@keyframes slowMovement {
    0% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(50px, 50px) scale(1.05);
    }
    100% {
        transform: translate(0, 0) scale(1);
    }
}


/* Forma 1: Superior Izquierda (Silver) */
.shape-1 {
    width: 450px;
    height: 450px;
    top: -100px; 
    left: -150px;
    background-color: var(--color-text-secondary); 
    animation: fluidMovement 45s infinite alternate ease-in-out;
}

/* Forma 2: Inferior Derecha (Highlight) */
.shape-2 {
    width: 550px;
    height: 550px;
    bottom: -150px;
    right: -200px;
    background-color: var(--color-highlight); 
    animation: fluidMovement 55s infinite alternate reverse ease-in-out;
}

/* Forma 3: Nueva, central/derecha (Secundario) */
.shape-3 {
    position: fixed;
    width: 300px;
    height: 300px;
    top: 50%;
    right: 10%;
    border-radius: 50%;
    opacity: 0.08; 
    z-index: -1;
    filter: blur(80px);
    background-color: var(--color-highlight); 
    animation: fluidMovement 35s infinite alternate ease-in-out;
}

/* ------------------------------------------------------------------ */
/* --- HEADER (BLUR/GLASSMORPHISM) --- */
/* ------------------------------------------------------------------ */

.header {
    /* Posición fija para el navbar */
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.8); /* Fondo semi-transparente (Claro) */
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px); 
    border-bottom: 1px solid rgba(224, 224, 230, 0.5); /* Borde más sutil */
    transition: background-color 0.3s, border-color 0.3s;
}

/* Ajuste del Navbar Blur para Modo Oscuro */
.dark-mode .header {
    background-color: rgba(28, 28, 30, 0.8); 
    border-bottom: 1px solid rgba(58, 58, 60, 0.5); 
}


/* Botones y Enlaces */
a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--color-highlight);
}

.button {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px; 
    font-weight: 500;
    text-align: center;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.button.primary {
    background-color: var(--color-highlight);
    color: var(--color-background);
}

.button.primary:hover {
    background-color: #005bb5;
    color: var(--color-background);
}

.button.secondary {
    background-color: transparent;
    border-color: var(--color-border);
    color: var(--color-primary);
}

.button.secondary:hover {
    background-color: var(--color-surface);
}

/* Header Continuación */
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    font-weight: 700;
    font-size: 1.4rem;
    transition: transform 0.3s, color 0.3s;
}

.logo:hover {
    color: var(--color-highlight);
    transform: translateX(5px);
}

nav a {
    margin-left: 25px;
    font-weight: 500;
    font-size: 0.95rem;
}

#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
}

#theme-icon {
    width: 24px;
    height: 24px;
}

/* Hero Section (Introducción) */
.hero {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 60px 0;
}

.hero-content {
    flex: 2;
}

.role-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.summary-text {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
}

.location {
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-pic {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%; 
    border: 4px solid var(--color-surface);
}

/* Habilidades y Educación (Grid) */
.grid-2-cols {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 60px;
}

.skills-column {
    border-right: 1px solid var(--color-border);
    padding-right: 40px;
}

.skill-group {
    margin-bottom: 20px;
}

.skill-title {
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.skill-list {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

.soft-skills-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    font-size: 0.95rem;
}

.soft-skills-list li {
    background-color: var(--color-surface);
    padding: 5px 10px;
    border-radius: 5px;
}

.education-item {
    margin-bottom: 20px;
    padding-left: 15px;
    border-left: 3px solid var(--color-highlight); 
}

.degree {
    font-weight: 600;
    margin-bottom: 0;
}

.institution, .location {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 0;
}

/* Experiencia / Proyectos */
.project-card {
    background-color: var(--color-surface);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--color-border);
    transition: all 0.3s;
}

.project-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08); 
    transform: translateY(-4px); 
    border-color: var(--color-highlight);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.project-header h3 {
    margin-bottom: 0;
}

.badge {
    background-color: var(--color-border);
    color: var(--color-text-secondary);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Contacto */
.contact-section {
    text-align: center;
    padding: 60px 0;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

/* Footer */
.footer {
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    border-top: 1px solid var(--color-border);
}

/* Media Queries (Responsive) */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.7rem; }
    
    .header .container {
        flex-direction: column;
    }

    nav {
        margin: 10px 0;
    }

    nav a {
        margin: 0 10px;
    }

    .hero {
        flex-direction: column;
        text-align: center;
    }

    .hero-image-container {
        order: -1; 
        margin-bottom: 20px;
    }

    .grid-2-cols {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .skills-column {
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid var(--color-border);
        padding-bottom: 40px;
    }

    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .badge {
        margin-top: 5px;
    }
}
