/* VARIABLES Y SISTEMA DE DISEÑO */
:root {
    --primary-color: #64ffda; /* Verde terminal más suave y elegante */
    --secondary-color: #8892b0; /* Gris azulado para textos secundarios */
    --bg-color: #0a192f; /* Azul navy muy oscuro (Tendencia actual dev portfolios) */
    --bg-light: #112240; /* Color para las tarjetas */
    --text-color: #ccd6f6; /* Blanco roto para legibilidad */
    --text-heading: #e6f1ff; /* Blanco puro para títulos */
    
    --font-mono: 'Fira Code', 'Consolas', monospace;
    --font-body: 'Inter', -apple-system, system-ui, sans-serif;
    
    --transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.light-theme {
    --bg-color: #f0f2f5;
    --bg-light: #ffffff;
    --text-color: #1f2937;
    --text-heading: #111827;
    --primary-color: #0077b6;
    --secondary-color: #4b5563;
}

/* RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* TIPOGRAFÍA */
h1, h2, h3, h4, .section-number, .nav-menu, .btn, .terminal-prompt {
    font-family: var(--font-mono);
}

h1 {
    font-size: clamp(40px, 8vw, 80px);
    font-weight: 600;
    color: var(--text-heading);
    margin: 0;
}

h2 {
    font-size: clamp(26px, 5vw, 32px);
    color: var(--text-heading);
}

p {
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* UTILS */
.loader-wrapper {
    position: fixed;
    inset: 0;
    background: var(--bg-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}
.loader {
    width: 50px;
    height: 50px;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* NAVEGACIÓN */
.nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: flex-end;
    gap: 2rem;
    z-index: 100;
    background: rgba(10, 25, 47, 0.85);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.nav-menu a {
    color: var(--text-color);
    font-size: 0.85rem;
}

.nav-menu a:hover, .nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu a::before {
    content: attr(data-section); 
    display: none; 
} 

/* HEADER / HERO */
header {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 clamp(25px, 10vw, 150px);
    position: relative;
}

.header-content {
    max-width: 1000px;
    z-index: 2;
}

.terminal-prompt {
    color: var(--primary-color);
    margin-bottom: 1.2rem;
    display: block;
    font-size: 1rem;
}

.job-title {
    font-size: clamp(30px, 5vw, 60px);
    font-weight: 600;
    color: var(--secondary-color);
    line-height: 1.1;
    margin-bottom: 2rem;
}

.hero-description {
    max-width: 540px;
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
}

.btn {
    padding: 1rem 1.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-block;
}

.btn-primary {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}
.btn-primary:hover {
    background: rgba(100, 255, 218, 0.1);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-color);
}
.btn-secondary:hover {
    transform: translateY(-3px);
}

/* SECCIONES GENERAL */
section {
    padding: 100px 0;
    max-width: 1000px;
    margin: 0 auto;
    padding-inline: clamp(25px, 5vw, 50px);
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
    white-space: nowrap;
}

.section-number {
    color: var(--primary-color);
    font-family: var(--font-mono);
    margin-right: 10px;
    font-size: 1.2rem;
}

.section-line {
    display: block;
    height: 1px;
    background: #233554;
    width: 300px;
    margin-left: 20px;
}

/* ABOUT */
.about-container {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 50px;
}

.tech-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 200px));
    gap: 0 10px;
    list-style: none;
    margin-top: 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.tech-list li::before {
    content: "▹";
    color: var(--primary-color);
    margin-right: 10px;
}

.image-frame {
    position: relative;
    max-width: 300px;
    border-radius: 4px;
    background-color: var(--primary-color);
}

.image-frame img {
    width: 100%;
    display: block;
    border-radius: 4px;
    mix-blend-mode: multiply;
    filter: grayscale(100%) contrast(1);
    transition: var(--transition);
}

.image-frame:hover img {
    mix-blend-mode: normal;
    filter: none;
}

/* PROYECTOS (Grid de tarjetas limpias) */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.project-card {
    background-color: var(--bg-light);
    padding: 2rem 1.75rem;
    border-radius: 4px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    /* Glassmorphism sutil para evitar bordes */
    box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
}

.project-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 20px 30px -15px rgba(2, 12, 27, 0.7);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.folder-icon {
    color: var(--primary-color);
    font-size: 40px;
}

.project-links a {
    color: var(--text-color);
    font-size: 1.2rem;
    margin-left: 1rem;
}

.project-links a:hover {
    color: var(--primary-color);
}

.project-title {
    margin-bottom: 10px;
    color: var(--text-heading);
    font-size: 1.4rem;
}

.project-description {
    font-size: 0.95rem;
    flex-grow: 1;
}

.project-tech-list {
    list-style: none;
    display: flex;
    gap: 15px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--secondary-color);
    margin-top: 20px;
}

/* EXPERIENCIA (Minimal Timeline) */
.timeline {
    border-left: 2px solid #233554;
    margin-left: 20px;
    padding-left: 20px;
}

.timeline-item {
    margin-bottom: 40px;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 2px solid var(--primary-color);
}

.timeline-content h3 {
    margin-bottom: 5px;
    font-size: 1.3rem;
    color: var(--text-heading);
}

.timeline-company {
    color: var(--primary-color);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.timeline-content::after { /* Fecha */
    content: attr(data-date);
    display: block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.tech-tags {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}
.tech-tags span {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    background: rgba(100, 255, 218, 0.1);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 4px;
}

/* SKILLS */
.skills-filter {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    justify-content: center;
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--secondary-color);
    font-family: var(--font-mono);
    cursor: pointer;
    padding-bottom: 5px;
    transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
    color: var(--primary-color);
    border-bottom: 1px solid var(--primary-color);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.skill-card-compact {
    background: var(--bg-light);
    padding: 1.5rem;
    text-align: center;
    border-radius: 4px;
    transition: var(--transition);
}

.skill-card-compact:hover {
    transform: translateY(-5px);
    background: #1d2d50; /* Un poco más claro al hover */
}

.skill-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.skill-title {
    font-size: 0.9rem;
    font-weight: 400;
}

.learning-path {
    margin-top: 50px;
    padding: 20px;
    border: 1px dashed var(--secondary-color);
    border-radius: 4px;
    text-align: center;
}
.learning-tags {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}
.learning-tags span {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-color);
}

/* CONTACTO */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.big-btn {
    margin: 3rem 0;
    padding: 1.25rem 3rem;
    font-size: 1rem;
}

.contact-form-wrapper {
    text-align: left;
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--primary-color);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px;
    background: var(--bg-color);
    border: 1px solid #233554;
    color: var(--text-color);
    border-radius: 4px;
    font-family: var(--font-body);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* FOOTER */
footer {
    padding: 20px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--secondary-color);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .nav-menu {
        display: none; /* Simplificado para este ejemplo, asumo uso de hamburger logic */
    }
    
    .nav-menu.active {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-top: 80px;
    }

    .hamburger-menu {
        display: block;
        position: fixed;
        right: 20px;
        top: 20px;
        z-index: 101;
        color: var(--primary-color);
        font-size: 1.5rem;
        cursor: pointer;
    }

    .about-container {
        grid-template-columns: 1fr;
    }
    .image-frame {
        margin: 0 auto;
    }
}