/* --------------------------------------------------- */
/* ESTILOS Y VARIABLES GLOBALES                      */
/* --------------------------------------------------- */

:root {
    --font-dm-serif: 'DM Serif Display', serif;
    --font-inter: 'Inter', sans-serif;
    --color-primary: #4CCFDC;
    --color-button: #23C5D4;
    --color-button-hover: #1faab8;
    --color-dark-bg: rgba(10, 17, 40, 0.04);
    --color-white: #ffffff;
    --color-text-base: rgba(10, 17, 40, 0.87);
    --color-text-muted: rgba(10, 17, 40, 0.60);
    --color-border: rgba(10, 17, 40, 0.12);
    --color-live: #22c55e;
    --section-padding: 48px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-inter);
    color: var(--color-text-base);
    line-height: 1.5;
    background-color: var(--color-white);
    margin: 0;
    padding: 0;
}

body.menu-open {
    overflow: hidden;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* --------------------------------------------------- */
/* ESTILOS DE TIPOGRAFÍA                             */
/* --------------------------------------------------- */

.h1-display {
    font-family: var(--font-dm-serif);
    font-weight: 400;
    letter-spacing: -1.6px;
    font-size: 64px;
    line-height: 70.4px;
    margin-bottom: 0;
}

.h2-display {
    font-family: var(--font-dm-serif);
    font-weight: 400;
    letter-spacing: -0.01em;
    font-size: 40px;
    line-height: 44px;
    margin: 0;
}

.h3-block-subtitle { font-family: var(--font-inter); font-weight: 600; letter-spacing: 0; line-height: 1.2em; margin: 0; }
/* @media (min-width: 1024px) { .h3-block-subtitle { font-size: 1.75rem; line-height: 2.1rem; } }
@media (min-width: 768px) and (max-width: 1023px) { .h3-block-subtitle { font-size: 1.5rem; line-height: 1.8rem; } }
@media (max-width: 767px) { .h3-block-subtitle { font-size: 1.25rem; line-height: 1.5rem; } } */

.p-description-list { font-family: var(--font-inter); font-weight: 400; letter-spacing: 0; line-height: 1.5em; font-size: 1rem; color: var(--color-text-muted); margin-top: 0; }
.h4-internal-subtitle { font-family: var(--font-inter); font-weight: 400; letter-spacing: 0; line-height: 1.4em; margin-top: 0; color: var(--color-text-base); }
/* @media (min-width: 1024px) { .h4-internal-subtitle { font-size: 1.25rem; line-height: 1.75rem; } }
@media (max-width: 1023px) { .h4-internal-subtitle { font-size: 1.125rem; line-height: 1.575rem; } } */

.text-contact-footer { font-family: var(--font-inter); font-weight: 400; letter-spacing: 0; line-height: 1.4em; font-size: 0.875rem; color: var(--color-text-muted); }
.btn-text { font-family: var(--font-inter); font-weight: 600; letter-spacing: 0.09em; line-height: 1.5em; }
/* @media (min-width: 1024px) { .btn-text { font-size: 1rem; line-height: 1.5rem; } }
@media (max-width: 1023px) { .btn-text { font-size: 0.9375rem; line-height: 1.40625rem; } } */

/* --------------------------------------------------- */
/* NAVEGACIÓN Y COMPONENTES GENERALES                */
/* --------------------------------------------------- */

.container { max-width: 800px; margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; }
.site-header { position: sticky; top: 0; width: 100%; z-index: 1001; background-color: var(--color-white); transition: background-color 0.3s ease-in-out, border-color 0.3s ease-in-out; border-bottom: 1px solid transparent; }
.site-header.scrolled { background-color: rgba(255, 255, 255, 0.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid rgba(10, 17, 40, 0.08); }
.header-content { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.header-name { font-family: var(--font-dm-serif); font-size: 1.5rem; font-weight: 400; color: var(--color-text-base); text-decoration: none; }
.menu-button { background: none; border: none; padding: 8px; cursor: pointer; }
.menu-button svg { display: block; width: 28px; height: 28px; stroke: var(--color-text-base); }
.mobile-nav { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--color-white); z-index: 1000; display: flex; flex-direction: column; justify-content: center; align-items: center; transform: translateX(100%); transition: transform 0.3s ease-in-out; }
.mobile-nav.is-open { transform: translateX(0); }
.nav-links { list-style: none; padding: 0; margin: 0; text-align: center; }
.nav-links li { margin-bottom: 2rem; }
.nav-link { 
    text-decoration: none; 
    font-size: 28px; 
    font-family: var(--font-inter);
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--color-button);
    transition: color 0.3s;
}
.nav-link:hover {
    color: var(--color-button-hover);
}
.section-chip { display: inline-block; padding: 4px 12px; background-color: #E0F7F9; color: var(--color-text-base); font-size: 14px; font-weight: 400; border-radius: 9999px; margin-bottom: 12px; }
.section { padding-top: var(--section-padding); padding-bottom: var(--section-padding); scroll-margin-top: 80px;}
#acerca { background-color: var(--color-white); }
#educacion { background-color: var(--color-dark-bg); }
#experiencia { background-color: var(--color-white); }
#especializacion { background-color: var(--color-dark-bg); }
#habilidades { background-color: var(--color-white); }
#contacto { background-color: var(--color-dark-bg); padding-bottom: 0; }

/* --------------------------------------------------- */
/* SECCIÓN DE INICIO (PERFIL)                          */
/* --------------------------------------------------- */

#inicio { position: relative; padding-top: var(--section-padding); padding-bottom: var(--section-padding); }
#inicio::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-image: url('image/fondo.png'); background-size: cover; background-position: center; z-index: 0; }
#inicio::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0,0,0,0.3); z-index: 1; }
#inicio .container { position: relative; z-index: 2; padding-bottom: 0; display: flex; flex-direction: column; gap: 0}

.profile-content {
    display: flex;
    align-items: center;
    gap: 0;
}
.profile-image-col {
    flex: 0 0 300px;
    width: 300px;
    height: 300px;
}
.profile-photo { width: 100%; height: 100%; object-fit: cover; }
.profile-details-col { flex: 1; }

#inicio .h2-display, #inicio .profile-subtitle { color: var(--color-white); }
.profile-subtitle { font-size: 1.5rem; line-height: 1.4; margin: 0; opacity: 0.9; }
.status-card { background-color: var(--color-white); border-radius: 16px; padding: 24px; box-shadow: 0 10px 25px -5px rgba(10, 17, 40, 0.1); position: relative; z-index: 3; }
.status-live { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.live-indicator { position: relative; width: 12px; height: 12px; background-color: var(--color-live); border-radius: 50%; }
.live-indicator::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--color-live); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0% { transform: scale(0.95); opacity: 0.7; } 70% { transform: scale(1.8); opacity: 0; } 100% { transform: scale(0.95); opacity: 0; } }
.status-text { font-weight: 600; color: var(--color-text-base); }
.status-intro { color: var(--color-text-muted); font-size: 1rem; margin: 0; }
@media (max-width: 767px) {
    .profile-content { gap: 0; }
    .profile-image-col { flex: 0 0 200px; width: 200px; height: 200px; }
}

/* --------------------------------------------------- */
/* LISTA DESPLEGABLE (ACORDEÓN)                      */
/* --------------------------------------------------- */
.static-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
}
.collapsible-list { margin-top: 2rem; }
.collapsible-item { border-bottom: 1px solid var(--color-border); }
.collapsible-item:last-child { border-bottom: none; }
.collapsible-header { display: flex; justify-content: space-between; align-items: center; cursor: pointer; padding: 24px 0; transition: background-color 0.3s; }
.header-main { flex: 1; margin-right: 16px; }
.header-main p { margin: 0; }
.header-main .item-subtitle { margin-bottom: 4px; }
.item-subtitle { font-size: 16px; color: var(--color-text-muted); line-height: 1.4; }
.item-title { font-size: 18px; color: var(--color-text-base); font-weight: 400; line-height: 1.4; }
.item-dates { font-size: 1rem; color: var(--color-text-muted); text-align: right; white-space: nowrap; margin-right: 16px; }
.collapsible-icon { width: 24px; height: 24px; stroke: var(--color-text-muted); transition: transform 0.3s ease; flex-shrink: 0; }
.collapsible-item.is-active .collapsible-icon { transform: rotate(45deg); }
.collapsible-content { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out, padding-bottom 0.4s ease-out; padding-left: 8px; }
.collapsible-content p { margin-top: 0; margin-bottom: 1rem; }
.collapsible-item.is-active .collapsible-content { padding-bottom: 24px; }

/* --------------------------------------------------- */
/* SECCIONES DE ESPECIALIZACIÓN Y HABILIDADES        */
/* --------------------------------------------------- */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; margin-top: 2rem; }
.skill-item { text-align: left; border-bottom: 1px solid var(--color-border); padding-bottom: 24px; }
.skills-grid .skill-item:nth-last-child(-n+2) { border-bottom: none; }
.skill-icon { width: 82px; height: 82px; border-radius: 50%; object-fit: cover; margin: 0 auto 8px auto; }
.skill-item .h4-internal-subtitle { margin-bottom: 8px; }
@media (max-width: 640px) { .skill-item:nth-child(odd) { border-right: 1px solid var(--color-border); padding-right: 15px; } .skill-item:nth-child(even) { padding-left: 15px; } .skills-grid { gap: 20px 0; } }

.h3-block-subtitle + .p-description-list, .h3-block-subtitle + .text-contact-footer, .h3-block-subtitle + .footer-grid { margin-top: 1.5rem; }

/* --------------------------------------------------- */
/* ESTILOS DE BOTONES                                */
/* --------------------------------------------------- */
.button-group { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 16px; }
.btn { display: inline-block; padding: 14px 32px; border-radius: 9999px; text-decoration: none; cursor: pointer; transition: background-color 0.3s, color 0.3s, border-color 0.3s; border: 2px solid transparent; }
.btn-primary { background-color: var(--color-button); color: var(--color-white); border-color: var(--color-button); }
.btn-primary:hover { background-color: var(--color-button-hover); border-color: var(--color-button-hover); }
.btn-secondary { background-color: transparent; color: var(--color-button); border-color: var(--color-button); }
.btn-secondary:hover { background-color: rgba(35, 197, 212, 0.12); }

.btn-text-only {
    padding: 0;
    border: none;
    background: none;
    color: var(--color-button);
    text-decoration: none;
    font-family: var(--font-inter);
    font-weight: 600;
    letter-spacing: 0.09em;
    transition: color 0.3s;
}
.btn-text-only:hover {
    color: var(--color-button-hover);
    background-color: transparent;
}

/* --------------------------------------------------- */
/* FOOTER                                            */
/* --------------------------------------------------- */
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; text-align: left; }
.footer-photo { width: 176px; height: 176px; object-fit: cover; margin-bottom: 1rem; }

.contact-block { margin: 0; }
.contact-block p { margin: 0; }
.footer-col-1 p { margin: 0; }
.footer-col-1 { display: flex; flex-direction: column; align-items: center; text-align: center; }
.footer-col-2 { display: flex; flex-direction: column; gap: 1.5rem; align-items: flex-start; }

.social-icons { display: flex; gap: 12px; margin-top: 8px; }
.social-icon { width: 36px; height: 36px; background-color: var(--color-text-muted); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--color-text-muted); }
.social-icon svg { width: 20px; height: 20px; }
.footer-divider { height: 1px; background-color: var(--color-border); margin-top: var(--section-padding); }
.copyright { text-align: center; padding: 24px 0; }
@media (max-width: 767px) { 
    .footer-grid { gap: 20px; } 
}