/* --- VARIABLES Y CONFIGURACIÓN --- */
:root {
    /* Paleta de Colores: Luz Técnica */
    --bg-body: #F8F9FA;
    --bg-card: #FFFFFF;
    --text-main: #212529;
    --text-muted: #6C757D;
    --accent: #00c1f6;       /* Verde Azulado (Teal) */
    --accent-hover: #002d8f;
    --code-color: #E83E8C;   /* Rosa suave para detalles de código */
    
    /* Fuentes */
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --font-code: 'Fira Code', monospace;
}

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

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- TIPOGRAFÍA GENÉRICA --- */
h1, h2, h3 { font-family: var(--font-heading); color: var(--text-main); }
.section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}
/* Pequeña línea debajo de los títulos */
.section-title::after {
    content: "";
    display: block;
    width: 50%;
    height: 4px;
    background: var(--accent);
    margin-top: 5px;
    border-radius: 2px;
}

.highlight-code {
    font-family: var(--font-code);
    color: var(--code-color);
    background: rgba(232, 62, 140, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* --- BOTONES --- */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 5px;
    font-weight: 500;
    font-family: var(--font-heading);
    cursor: pointer;
}

.btn-filled {
    background-color: var(--accent);
    color: white;
}
.btn-filled:hover { background-color: var(--accent-hover); transform: translateY(-2px); }

.btn-outline {
    border: 2px solid var(--accent);
    color: var(--accent);
    margin-left: 10px;
}
.btn-outline:hover { background-color: rgba(0, 168, 150, 0.1); }

/* --- NAVEGACIÓN --- */
.navbar {
    background: var(--bg-card);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-family: var(--font-code);
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--accent);
}
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a { font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: var(--accent); }
/* Estilo especial para el botón del menú */
.nav-links .btn-primary { 
    color: var(--accent); 
    border: 1px solid var(--accent);
    padding: 5px 15px;
    border-radius: 4px;
}

/* --- HERO SECTION --- */
.hero {
    padding: 8rem 0 5rem;
}
.greeting {
    font-family: var(--font-code);
    color: var(--accent);
    margin-bottom: 10px;
}
.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 10px;
}
.hero .subtitle {
    font-size: 2rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 20px;
}
.bio-short {
    max-width: 600px;
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* --- SECCIÓN SKILLS --- */
.section { padding: 5rem 0; }
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}
.skill-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    border: 1px solid transparent;
    transition: 0.3s;
    text-align: center;
}
.skill-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}
.skill-card i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

/* --- PROYECTOS (GRID) --- */
.bg-light { background-color: #f1f3f5; }

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.project-card {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: 0.3s;
}
.project-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }

.project-image {
    height: 180px;
    background-color: #ddd;
    overflow: hidden;
}
.placeholder-img {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
}

.project-info { padding: 1.5rem; }
.project-info h3 { margin-bottom: 0.5rem; font-size: 1.25rem; }
.project-info p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1rem; }

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1.5rem;
}
.tech-stack span {
    font-family: var(--font-code);
    font-size: 0.8rem;
    color: var(--accent);
    background: rgba(0, 168, 150, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
}

.project-links { display: flex; gap: 15px; }
.project-links a { font-size: 0.9rem; font-weight: 500; display: flex; align-items: center; gap: 5px; }
.project-links a:hover { color: var(--accent); }

/* --- FOOTER --- */
footer {
    padding: 5rem 0 2rem;
    text-align: center;
}
.social-links { margin: 2rem 0; font-size: 1.5rem; }
.social-links a { margin: 0 10px; color: var(--text-muted); }
.social-links a:hover { color: var(--accent); }
.copyright { font-size: 0.9rem; color: var(--text-muted); font-family: var(--font-code); }

/* --- RESPONSIVO (MÓVIL) --- */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .hero .subtitle { font-size: 1.5rem; }
    .nav-links { display: none; } /* En una versión real agregarías un menú hamburguesa con JS */
}

/* --- MODO OSCURO --- */

/* Estilos para el botón de tema */
.theme-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    font-size: 1.2rem;
    padding: 0 10px;
    transition: transform 0.3s ease;
}
.theme-btn:hover {
    transform: scale(1.1);
}

/* Variables y estilos para Modo Oscuro */
body.dark-mode {
    --bg-body: #121212;
    --bg-card: #1e1e1e;
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --border-color: #333;
    
    background-color: var(--bg-body);
    color: var(--text-main);
}

body.dark-mode .navbar,
body.dark-mode footer {
    background-color: var(--bg-card);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

body.dark-mode .nav-links a {
    color: var(--text-main);
}

body.dark-mode .project-card,
body.dark-mode .skill-card,
body.dark-mode form,
body.dark-mode table {
    background-color: var(--bg-card) !important;
    color: var(--text-main);
}

body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
    background-color: #2d2d2d !important;
    color: #fff !important;
    border: 1px solid var(--border-color) !important;
}

body.dark-mode .bg-light {
    background-color: #0a0a0a !important;
}

body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, 
body.dark-mode .section-title {
    color: #fff;
}