/* ============================================
   profile.css — Narrative scroll profile page
   Stratigraphic timeline: layers revealed as
   you scroll, like an excavation section.
   Load AFTER style.css.
   ============================================ */

/* ── Variables de color según el Tema ── */
body.light-theme {
    --pf-text-color: #2b2b2b;
    --pf-primary-color: #3629cb;
    --pf-strata-line: rgba(54, 41, 203, 0.35);
    --pf-dot-border: #ffffff;
    --pf-skill-bg: rgba(54, 41, 203, 0.08);
    --pf-skill-border: rgba(54, 41, 203, 0.2);
}

body.dark-theme {
    --pf-text-color: #f0f0f0;
    --pf-primary-color: #ffcc00; /* Un color ámbar/dorado de contraste para el modo oscuro */
    --pf-strata-line: rgba(255, 204, 0, 0.35);
    --pf-dot-border: #140129; /* Color de tu gradiente oscuro */
    --pf-skill-bg: rgba(255, 204, 0, 0.12);
    --pf-skill-border: rgba(255, 204, 0, 0.3);
}

/* Forzar que el contenedor del portafolio/perfil use los colores correctos */
.profile-content {
    width: 100% !important;
    max-width: 100%;
    background-color: transparent !important;
    padding: 0 !important;
    color: var(--pf-text-color) !important;
}

/* ── Selector de Idioma (Tabs) ── */
.lang-selector {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 1rem;
}

.lang-btn {
    font-family: "Lato", sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border: 1.5px solid var(--pf-primary-color);
    background: transparent;
    color: var(--pf-text-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.6;
}

.lang-btn.active {
    background: var(--pf-primary-color);
    color: var(--pf-dot-border) !important;
    opacity: 1;
}

/* Lógica de control de idiomas por CSS */
.profile-wrapper[data-lang="en"] [lang="es"] { display: none !important; }
.profile-wrapper[data-lang="es"] [lang="en"] { display: none !important; }

/* ── Page wrapper ── */
.pf-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 2rem 1.2rem 4rem 1.2rem;
}

/* ── Hero block ── */
.pf-hero {
    padding: 2.5rem 0 2rem 0;
    border-bottom: 2px solid var(--pf-primary-color);
    margin-bottom: 2.5rem;
}

.pf-hero-eyebrow {
    font-family: "Lato", sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pf-primary-color);
    margin-bottom: 0.6rem;
}

.pf-hero h2 {
    font-family: "Lora", serif;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.5rem 0;
    color: inherit;
}

.pf-hero-sub {
    font-family: "Lato", sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.8;
    margin: 0;
    max-width: 560px;
}

/* ── Credential pills row (Actualizado con colores legibles en ambos modos) ── */
.pf-creds {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 1.5rem;
}

.pf-cred {
    font-family: "Lato", sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1.5px solid rgba(255,255,255,0.15);
    white-space: nowrap;
}

body.light-theme .pf-cred.purple { background: #EEEDFE; border-color: #AFA9EC; color: #3C3489; }
body.light-theme .pf-cred.teal   { background: #E1F5EE; border-color: #5DCAA5; color: #085041; }
body.light-theme .pf-cred.amber  { background: #FAEEDA; border-color: #EF9F27; color: #633806; }
body.light-theme .pf-cred.blue   { background: #E6F1FB; border-color: #85B7EB; color: #0C447C; }
body.light-theme .pf-cred.coral  { background: #FAECE7; border-color: #F0997B; color: #712B13; }

body.dark-theme .pf-cred { background: rgba(255,255,255,0.08); color: #f0f0f0; border-color: var(--pf-primary-color); }

/* ── Stratigraphic timeline ── */
.pf-strata {
    position: relative;
    padding-left: 2.2rem;
}

.pf-strata::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 6px;
    bottom: 0;
    width: 2px;
    background: repeating-linear-gradient(
        to bottom,
        var(--pf-primary-color) 0px,
        var(--pf-primary-color) 6px,
        transparent 6px,
        transparent 12px
    );
}

/* ── Each stratum (section) ── */
.pf-stratum {
    position: relative;
    margin-bottom: 2.8rem;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.pf-stratum.visible {
    opacity: 1;
    transform: translateY(0);
}

.pf-stratum::before {
    content: '';
    position: absolute;
    left: -2.2rem;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--pf-primary-color);
    border: 2px solid var(--pf-dot-border);
    box-shadow: 0 0 0 2px var(--pf-primary-color);
}

.pf-layer-label {
    font-family: "Lato", sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pf-primary-color);
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pf-layer-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--pf-primary-color);
    opacity: 0.2;
    max-width: 60px;
}

.pf-stratum h3 {
    font-family: "Lora", serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: inherit;
}

.pf-stratum p {
    font-family: "Lato", sans-serif;
    font-size: 0.92rem;
    line-height: 1.7;
    margin: 0 0 0.5rem 0;
    opacity: 0.85;
    color: inherit;
}

.pf-stratum p + p {
    margin-top: 0.5rem;
}

/* ── Mini tag list inside a stratum ── */
.pf-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 0.8rem;
}

.pf-skill {
    font-family: "Lato", sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 4px;
    background: var(--pf-skill-bg);
    color: var(--pf-text-color);
    border: 1px solid var(--pf-skill-border);
}



/* ── Quote block inside strata ── */
.pf-pullquote {
    font-family: "Lora", serif;
    font-style: italic;
    font-size: 1rem;
    line-height: 1.6;
    border-left: 3px solid var(--pf-primary-color);
    padding-left: 1rem;
    margin: 1rem 0 0.5rem 0;
    opacity: 0.75;
}

/* ── Field locations strip ── */
.pf-fieldwork {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0.8rem;
}

.pf-field {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: "Lato", sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: inherit;
    opacity: 0.75;
}

.pf-field i {
    font-size: 0.9rem;
    color: var(--pf-primary-color);
    opacity: 0.7;
}

.pf-field::after {
    content: '·';
    margin-left: 8px;
    opacity: 0.3;
}
.pf-field:last-child::after { content: ''; }

/* ── Section divider ── */
.pf-divider {
    border: none;
    border-top: 1px dashed var(--pf-primary-color);
    margin: 0 0 2.8rem 0;
    opacity: 0.3;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .pf-hero h2 { font-size: 1.5rem; }
    .pf-page { padding: 1.2rem 0.8rem 3rem 0.8rem; }
    .pf-strata { padding-left: 1.8rem; }
    .pf-stratum::before { left: -1.8rem; }
}