/* css/modern-clean.css */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;500;700&family=Inter:wght@300;400;600&display=swap');

:root {
    --bg: #0b0f19;       /* Negro azulado profundo */
    --surface: #151b2b;  /* Ligeramente más claro */
    --accent: #64ffda;   /* Un cian/menta eléctrico para destacar */
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, .brand {
    font-family: 'Space Grotesk', sans-serif; /* Tipografía técnica */
}

a { text-decoration: none; color: inherit; transition: 0.3s; }

/* --- HEADER MINIMALISTA --- */
header {
    padding: 2rem 5%;
    display: flex; justify-content: space-between; align-items: center;
    position: absolute; width: 100%; top: 0; left: 0; z-index: 10;
}
.brand { font-size: 1.5rem; font-weight: 700; letter-spacing: -1px; }
.brand span { color: var(--accent); }

nav ul { display: flex; gap: 40px; list-style: none; }
nav a { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; opacity: 0.7; }
nav a:hover, nav a.active { opacity: 1; color: var(--accent); }

/* --- SECCIÓN PRINCIPAL: BIOGRAFÍA (INDEX) --- */
.bio-hero {
    min-height: 90vh; /* Ocupa casi toda la pantalla */
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 10%; /* Márgenes anchos para elegancia */
    padding-top: 100px;
    position: relative;
}

.bio-intro {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.bio-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem); /* Escalable */
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 30px;
    max-width: 900px;
}

.bio-title span { color: var(--text-muted); }

.bio-description {
    max-width: 600px;
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 50px;
    border-left: 2px solid var(--accent);
    padding-left: 20px;
}

.cta-group { display: flex; gap: 20px; align-items: center; }

.btn {
    padding: 15px 30px;
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: 4px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
}
.btn:hover { background: rgba(100, 255, 218, 0.1); }
.btn-text { color: var(--text); border-bottom: 1px solid transparent; }
.btn-text:hover { border-color: var(--text); }

/* --- DATOS RÁPIDOS (INDEX) --- */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    padding: 4rem 10%;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}
.stat h3 { font-size: 1rem; color: var(--accent); margin-bottom: 10px; }
.stat p { font-size: 0.95rem; color: var(--text-muted); }

/* --- REJILLA GENÉRICA (GALERÍA/INDEX) --- */
.container { padding: 80px 10%; }
.section-header { margin-bottom: 60px; }
.section-title { font-size: 2rem; display: flex; align-items: center; gap: 20px; }
.section-title::after { content: ""; flex-grow: 1; height: 1px; background: var(--border); }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: 0.3s;
    display: flex; flex-direction: column;
}

.project-card:hover { transform: translateY(-5px); border-color: var(--accent); background: var(--surface); }

/* --- css/modern-clean.css --- */

/* MODIFICACIÓN: Adaptar card-top para imágenes reales */
.card-top {
    height: 260px;          /* Altura fija para que todas las tarjetas sean iguales */
    padding: 0;             /* Quitamos el padding interno */
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;       /* Escondemos lo que sobresalga de la imagen */
    border-bottom: 1px solid var(--border);
    position: relative;
}

/* Estilo para la etiqueta <img> dentro de la tarjeta */
.card-top img {
    width: 100%;
    height: 100%;
    object-fit: cover;      /* La imagen cubre todo el espacio sin deformarse */
    object-position: center;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1); /* Transición suave */
    cursor: zoom-in;
}

/* El fondo oscuro que cubre toda la pantalla */
.lightbox-modal {
    display: none; /* Oculto por defecto */
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9); /* Negro al 90% de opacidad */
    align-items: center;
    justify-content: center;
}

/* La imagen dentro del modal */
.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh; /* Que no sea más alta que la pantalla */
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    animation-name: zoom;
    animation-duration: 0.3s;
}

/* Botón de cerrar (X) */
.close-lightbox {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: var(--accent);
    text-decoration: none;
    cursor: pointer;
}

/* Animación de entrada */
@keyframes zoom {
    from {transform:scale(0)} 
    to {transform:scale(1)}
}

/* Ajuste móvil */
@media only screen and (max-width: 700px){
    .lightbox-content {
        width: 100%;
    }
}

/* Efecto zoom suave al pasar el ratón por la tarjeta entera */
.project-card:hover .card-top img {
    transform: scale(1.08);
}

/* (Opcional) Si alguna vez necesitas volver a usar solo un icono, usa esta clase auxiliar */
.card-top.icon-mode {
    padding: 2rem;
    font-size: 2.5rem;
    color: var(--accent);
}

.card-content { padding: 2rem; flex-grow: 1; }
.card-title { margin-bottom: 10px; color: var(--text); }
.card-desc { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 20px; }

.tags { display: flex; gap: 10px; flex-wrap: wrap; font-size: 0.8rem; font-family: 'Space Grotesk', monospace; }
.tag { color: var(--accent); }

/* --- PÁGINA CONTACTO --- */
.contact-layout {
    display: grid; grid-template-columns: 1fr 1fr; gap: 80px;
    padding-top: 60px;
}
.contact-left h1 { font-size: 3.5rem; line-height: 1; margin-bottom: 30px; }
.form-input {
    width: 100%; background: var(--surface); border: none; border-bottom: 2px solid var(--border);
    padding: 15px 0; color: var(--text); margin-bottom: 30px; font-family: inherit;
}
.form-input:focus { outline: none; border-color: var(--accent); }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .bio-hero { padding: 150px 5% 50px; }
    .bio-title { font-size: 2.8rem; }
    .contact-layout { grid-template-columns: 1fr; }
    nav ul { gap: 20px; }
}