
/*Variables y themes*/
:root {
    --bg: #ffffff;
    --text: #111111;
    --muted: #555;
    --border: #e5e5e5;
    --accent: #000;

    --font-body: 'Roboto', sans-serif;
    --font-title: 'Roboto', sans-serif;
}

#dark-toggle:checked ~ .page {
  --bg: #0f0f0f;
  --text: #f1f1f1;
  --muted: #aaa;
  --border: #222;
  --accent: #fff;
}

/*Reset básico */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

/*tipografía y colores base */
body {
    font-family: var(--font-body);
    line-height: 1.7;
    transition: background 0.4s ease, color 0.4s ease;
}

.page {
    position: relative;
    z-index: 1;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    transition: background 0.4s ease, color 0.4s ease;
}

/*dark mode toggle*/
#dark-toggle {
    position: absolute;
    left: -9999px;
}
.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.6;
    z-index: 9999;
    color: var(--text);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-toggle:hover {
    opacity: 1;
    transform: rotate(20deg);
}
/* Forzar visibilidad del toggle en dark mode */
#dark-toggle:checked + .theme-toggle {
    color: #f1f1f1;
    opacity: 0.8;
}


/*Navegación */
header {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: var(--bg);
    border-bottom: 1px solid color-mix(in srgb, var(--text) 15%, transparent);
}

.navbar {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;

}

.logo {
    font-family: var(--font-title);
    letter-spacing: 2px;
    font-size: 1.1rem;
}
.logo a{
    text-decoration: none;
    color: inherit;
}
.logo a:hover {
    opacity: 0.7;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.nav-links a{
    text-decoration: none;
    color: var(--text);
    font-size: 0.9rem;
    position: relative;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.nav-links a.active {
    opacity: 1;
}


/*micro animación underline */
.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 1px;
    background: currentColor;
    opacity: 0;
    transition: width 0.3s ease, opacity 0.2s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
    opacity: 1;
}



/* Contenido (mobile first)*/
main {
    max-width: 1600px;
    margin: 0 auto;
    padding-top: 2rem;
    padding-bottom: 6rem;
    padding-inline: 3rem;

}

section {
    scroll-margin-top: 100px; /*altura del header*/
}

.section {
    max-width: min(1000px, 90%);
    margin-inline: auto;
    margin-bottom: 5rem;
    animation: fadeUp 0.8s ease both;
}

.section h2 {
    font-family: var(--font-title);
    font-size: 1.8rem;
    margin-bottom: 1.2rem;
    font-weight: 500;

}

.section p {
    font-size: 0.95rem;
    color: var(--muted);
}

/* Listas */
.list {
    list-style: none;
}

.list li {
    margin-bottom: 0.6rem;
    transition: transform 0.3s ease;
}

.list li:hover {
    transform: translateX(4px);
}

.list a {
    color: var(--text);
    text-decoration: none;
}

/* Footer */
footer {
  font-family: var(--font-body);
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--muted);
  border-top: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
  padding: 3rem 0;
  text-align: center;
}

/*animations*/
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*desktop enhancement*/
@media (max-width: 768px) {
    .bio-grid {
        grid-template-columns: 1fr;
    }
    .bio-image {
        max-width: 180px;
        margin-bottom: 1.5rem;
    }
    .navbar,
    main {
        padding: 2rem 1.5rem;
    }

    .nav-links {
        gap: 1.2rem;
    }
    .section {
        max-width: 100%;
    }
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}


.bio-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    align-items: stretch;
}
.bio-image {
    align-self: stretch;
}

.bio-image img {
    opacity: 0.9;
    transition: opacity 0.3s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 2px;
}
.bio-image img:hover {
    opacity: 1;
}

.hero {
    width: 100%;
    height: clamp(75vh, 90vh, 95vh);
    overflow: hidden;
    position: relative;
}
.hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 70%;
    filter: grayscale(100%);
    opacity: 0.7;
    display: block;
}

.resources {
    margin-top: 4rem;
}
.resource-header {
    margin-bottom: 2rem;
}
.resource-view main {
    padding-top: 7.5rem;
    padding-bottom: 2rem;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}
.resource-card {
    padding: 1.8rem 1.6rem;
    border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
    transition: border-color 0.3s ease, transform 0.3s ease;
}
.resource-card:hover {
    transform: translateY(-3px);
    border-color: var(--text);
}

.resource-type {
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    color: var(--muted);
    display: block;
    margin-bottom: 0.8rem;
}

.resource-card h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.6rem;
}

.resource-card p {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 1.2rem;
}

.resource-card a {
    font-size: 0.8rem;
    text-decoration: none;
    color: var(--text);
}

.resource-card a:hover {
    opacity: 0.7;
}
/* Ritmo vertical solo en páginas de recurso */
.resource-view .resource-content p,
.resource-view .resource-content li {
    line-height: 1.8;
    margin-bottom: 1rem;
}

.resource-view .resource-content ul,
.resource-view .resource-content ol {
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    padding-left: 1.2rem;
}

.resource-view .resource-content h2 {
    margin-top: 3rem;
    margin-bottom: 1.2rem;
}
/* Alinear metadata del recurso con el contenido */
.resource-view .resource-meta {
    margin-bottom: 2rem;    
}
.resource-view .resource-meta p {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0;    
}
/* Suavizar peso visual de metadata */
.resource-view .resource-meta strong {
    font-weight: 700; /* en lugar de bold */
    color: var(--muted);
}

/* CTA principal: Descargar patch */
.resource-download {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.resource-download .download-link {
    display: inline-block;
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    color: #1a73e8;
    text-decoration: none;
    padding-bottom: 4px;
    border-bottom: 1px solid color-mix(in srgb, var(--text) 40%, transparent);
    transition: opacity 0.3s ease, border-color 0.3s ease;
}

.resource-download .download-link:hover {
    opacity: 0.7;
    border-color: var(--text);
}

.resource-footer {
    padding: 2rem 0;
}


/* === FIX DEFINITIVO: resources + sticky header === */

/* Quitar animaciones y transforms heredados */
.resource-view .section,
.resource-view .resource-article,
.resource-view .resource-header {
    animation: none !important;
    transform: none !important;
}



/*grid para la página de Isadora-ejemplos*/
.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}
/*---*/
.resource-back {
    max-width: 720px;
    margin: 1.5rem auto 0 auto;
    text-align: center;
    font-size: 1.2rem;
    padding-bottom: 1.2rem;
}

.resource-back a {
    text-decoration: none;
    color: var(--muted);
}

.resource-back a:hover {
    color: var(--text);
}
/* Espacio entre la grilla de ejemplos y "Volver a RECURSOS" */
.examples-grid + .resource-back {
    margin-top: 4rem;
}


/* PROYECTOS – Galería visual */
/* ============================= */
/* PROYECTOS – Galería visual */
/* ============================= */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.project-item a {
    display: block;
    text-decoration: none;
    color: var(--text);
}

.project-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    opacity: 0.9;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.project-item h3 {
    margin-top: 0.6rem;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.project-item a:hover img {
    opacity: 1;
    transform: scale(1.01);
}

/* ============================= */
/* CONTACTO */
/* ============================= */

.contact {
    text-align: center;
}

.contact .lead {
    margin-bottom: 1.2rem;
}

.contact-email {
    margin-top: 2rem;
    font-size: 1rem;
}

.contact-email a {
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid color-mix(in srgb, var(--text) 20%, transparent);
    padding-bottom: 2px;
}

.contact-email a:hover {
    opacity: 0.7;
}
